Registers in Vim let you run actions or commands on text stored within them.
(Vim中的寄存器使您可以对其中存储的文本运行操作或命令。)
To access a register, you type "a
before a command, where a
is the name of a register. If you want to copy the current line into register k
, you can type (要访问寄存器,请在命令前键入"a
,其中a
是寄存器的名称。如果要将当前行复制到寄存器k
,则可以键入)
"kyy
Or you can append to a register by using a capital letter
(或者,您可以使用大写字母追加到注册簿中)
"Kyy
You can then move through the document and paste it elsewhere using
(然后,您可以浏览文档并将其粘贴到其他位置)
"kp
To paste from system clipboard on Linux
(从Linux上的系统剪贴板粘贴)
"+p
To paste from system clipboard on Windows (or from "mouse highlight" clipboard on Linux)
(从Windows上的系统剪贴板(或Linux上的“鼠标突出显示”剪贴板)粘贴)
"*p
To access all currently defined registers type
(要访问所有当前定义的寄存器类型)
:reg
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…