Vi/Vim – Backspace Not Working

If you try to delete characters in the insert mode with the backspace key in vi/vim text editor, this sometimes may not work.

Even though this is not a bug but a feature of vi/vim, you may still want to fix a backspace that is “not working”.

In this small note i will show how to fix “not working” backspace key in the insert mode in vi/vim.

Cool Tip: Fix “not working” arrow keys in vi/vim! Read more →

Fix Not Working Backspace in Vi/Vim

If you are using vi/vim text editor and the backspace key doesn’t work in the insert mode, run the following command to fix this:

:set backspace=indent,eol,start

To fix “not working” backspace key in the insert mode permanently, add set backspace=indent,eol,start command to vi/vim configuration file in your $HOME directory.

Fix “not working” backspace in vim:

$ echo "set backspace=indent,eol,start" >> ~/.exrc

Fix “not working” backspace in vi:

$ echo "set backspace=indent,eol,start" >> ~/.vimrc