0

If I have a file like this in Insert Mode (pipe is cursor):

Sunday
|
Monday

I can press Backspace or Delete to remove the empty line. However in Normal Mode, neither of those work. I have been working around this by using dd, but is a better option available?

  • Space or Return or about any other key won't work in normal mode either... dd is the way to delete a line in normal mode. What's wrong with that? Having said that, you can always remap Backspace or Delete to do what you want in normal mode if you wish to... – filbranden Mar 4 at 2:36
  • Quite sure it is duplicated – eyal karni Mar 9 at 6:28
1

Another option is J:

Join [count] lines, with a minimum of two lines. Remove the indent and insert up to two spaces.

http://vimdoc.sourceforge.net/htmldoc/change.html#J

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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