0

This question already has an answer here:

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?

marked as duplicate by Martin Tournoij Dec 20 '17 at 23:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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 '17 at 15:52
4

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.