Paste multiple times

后端 未结 6 1449
有刺的猬
有刺的猬 2021-01-29 22:30

What is the best way replace multiple lines with the contents of the clipboard?

The problem I\'m having is when I yank a line and paste it over another line the \"yank\

6条回答
  •  春和景丽
    2021-01-29 22:51

    I have this in my .vimrc:

    xnoremap p pgvy
    

    (note: this will work only with the default register, but this mapping is easy to remember). Writing a more elaborate version would be possible. Also, you still can use P to get the old behaviour.

提交回复
热议问题