How do I use vim registers?

后端 未结 17 2135
一向
一向 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:14

    One overlooked register is the '.' dot register which contains the last inserted text no matter how it was inserted eg ct] (change till ]). Then you realise you need to insert it elsewhere but can't use the dot repeat method.

     :reg .
     :%s/fred/./
    

提交回复
热议问题