Move entire line up and down in Vim

后端 未结 19 1172
无人及你
无人及你 2020-11-29 14:27

In Notepad++, I can use Ctrl + Shift + Up / Down to move the current line up and down. Is there a similar command to this in Vim?

19条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 15:05

    I put the following at the end of my .vimrc file:

    noremap H ddkkp
    noremap N ddp
    

    So now 'H' and 'N' move current line up and down respectively.

提交回复
热议问题