How to duplicate a whole line in Vim?

后端 未结 19 1106
北海茫月
北海茫月 2020-12-22 14:29

How do I duplicate a whole line in Vim in a similar way to Ctrl+D in IntelliJ IDEA/ Resharper or Ctrl+Alt+&

19条回答
  •  长情又很酷
    2020-12-22 14:58

    yy

    will yank the current line without deleting it

    dd

    will delete the current line

    p

    will put a line grabbed by either of the previous methods

提交回复
热议问题