Preserve whitespace while joining in Vim
I have this text:
abc
def
There are 3 spaces on the line before "def" and I want to make sure that space is preserved.
I usually join with J
in normal mode. There is, however, a :join
command that behaves the same way except you can follow it with an optional !
.
By using the abbreviation it is shortened to:
:j!
And the result I get is:
abc def
Space preserved!
See :help :join
for more information.