寄存器通常通过键入“然后输入寄存器的名称(单个字符),例如”ay then“ap到yank into寄存器a,然后放入寄存器a的内容,同样适用于change命令,在这种情况下,你不希望使用change命令删除的文本到任何地方,你可以使用黑洞寄存器“_:”_cw。然后在插入模式下,你可以点击ctrl-R,然后跟注你想要的寄存器“)来放入该寄存器的内容。
>“* – 选择寄存器(中间按钮粘贴)
>“ – 剪贴板寄存器(也可以通过ctrl-shift-v通过终端访问)
>“” – vim的默认(未命名)yank / put / change / delete / substitute寄存器。
简答:“_cw ^ R”
编辑:像其他人建议的,你当然可以使用一个不同的注册表(或任何),你的文本到默认寄存器。你不总是想到这一点,虽然,所以这是很好的做一个单一的更改命令,而不吹它。虽然它不是完全吹走。有编号的寄存器“0到”9:
Vim fills these registers with text from yank and delete commands.
Numbered register 0 contains the text from the most recent yank command,unless the command specified another register with [“x].
Numbered register 1 contains the text deleted by the most recent delete or change command,unless the command specified another register or the text is less than one line (the small delete register is used then). An exception is made for the delete operator with these movement commands:
%
,(
,)
,`
,/
,?
,n
,N
,{
and}
. Register “1 is always used then (this is Vi compatible). The “- register is used as well if the delete is within a line.With each successive deletion or change,Vim shifts the prevIoUs contents of register 1 into register 2,2 into 3,and so forth,losing the prevIoUs contents of register 9.