Insert a newline without entering in insert mode, vim

后端 未结 7 792
广开言路
广开言路 2021-01-31 13:24

I want insert newlines in normal mode in vim using Shift-Enter and Ctrl-Enter. I try some solutions and mixing solutions from Vim Wikia - Insert newline wi

7条回答
  •  无人及你
    2021-01-31 13:50

    Yank an empty line and shift-paste it:

    Starting with cursor on empty line:

    yy + (shift + p)
    

    "yy" yanks the line, and "shift + p" insert it below, without entering insert mode.

提交回复
热议问题