How to split line in Vim

To split a line at the cursor position you can use the usual sequence of i, Enter and Esc. This enters insert mode, adds a new line and then escapes from insert mode.

If your cursor is at a space in English text then you are in luck. You can insert a newline here by replacing the space with a newline character. To do that in Vim, press r and Enter. No need to escape insert mode!

Tried with: Vim 7.4

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s