How to duplicate a whole line in Vim?

后端 未结 19 1009
北海茫月
北海茫月 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:59

    Another option would be to go with:

    nmap  mzyyp`z
    

    gives you the advantage of preserving the cursor position.

提交回复
热议问题