In Vim the Backspace key only works on the current line of text.

This creates a problem if I am entering multiple lines of text and notice an error on the previous line. I have no apparent way to back up to the previous line and correct the mistake. I have to complete the edit, then go back and change it which can be annoying.

Example: I am typing lines of code and forget to end a line with a semicolon before hitting Enter. I would like to hit backspace, enter the semicolon, then hit Enter again and continue. This does not work.

Is there anyway to go back to a previous line while in insert mode?

  • The "vim" way would be to use normal mode for navigation (not backspace) and the make the edit, but for ease of use when typing the answer by Naumann has you covered.
    – D. Ben Knoble
    Dec 21, 2017 at 15:52

1 Answer 1


this is controlled by the backspace option. You want :set bs=eol

Not the answer you're looking for? Browse other questions tagged or ask your own question.