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?

2
  • 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, 2020 at 2:36
  • Quite sure it is duplicated
    – eyal karni
    Mar 9, 2020 at 6:28

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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