Vim Replace with New Line

This is a note titled "2019-04-25-vim-replace-with-new-line" taken from my note Library. Return to Library.

A common task in Vim is replacing the current character with another. Interestingly, you can even replace text with special character like line breaks.

this is some text

In normal mode, execute r<Enter>. This will replace the current character with a line break and will leave you in normal mode.

this is
some text

Voila! That’s it.

You can learn 8 more tricks, by clicking here!