Troskyvs
Troskyvs

Reputation: 8047

How does vim break 1 line into 2 lines under normal mode, by 1 type?

Under normal mode, to merge 2 lines, we can press J. But how to break one line (somewhere in the middle) into 2 lines? Now I can only press i to enter insert mode and press <CR>.

Is there a command under normal mode, one type to do this?

Upvotes: 1

Views: 59

Answers (2)

Lungten
Lungten

Reputation: 11

As per How to break a line in vim in normal mode?

r<Enter> comes closest to what you are trying to do, although <CR> will replace the character under the cursor. It works for me because I usually break a line on a white space.

Upvotes: 1

Mukesh Soni
Mukesh Soni

Reputation: 1139

No there isn't. However you can map it like nnoremap K i<CR><esc>

Upvotes: 2

Related Questions