How do I use vim registers?

后端 未结 17 2124
一向
一向 2020-11-27 08:58

I only know of one instance using registers is via CtrlR* whereby I paste text from a clipboard.

What are other uses of registers?

17条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-27 09:10

    A cool trick is to use "1p to paste the last delete/change (, and then use . to repeatedly to paste the subsequent deletes. In other words, "1p... is basically equivalent to "1p"2p"3p"4p.

    You can use this to reverse-order a handful of lines: ffffdffffdffffdd"1p....

提交回复
热议问题