How do I use vim registers?

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

    I think the secret guru register is the expression = register. It can be used for creative mappings.

    :inoremap  \d The current date =system("date")
    

    You can use it in conjunction with your system as above or get responses from custom VimL functions etc.

    or just ad hoc stuff like

    =35+7
    

提交回复
热议问题