Vim:用于删除,删除整行,yank和x的寄存器的简明比较

Sti*_*ony 1 vim

我可以找到很多关于Vim中"剪切"和"复制"文本的狭隘方面的部分解释,以及它如何工作的几个相互矛盾的想法,但我找不到简单的概述.我正在寻找的是将它们放在一个地方的东西.我很确定我在这里有什么不对,并且有差距,但我想要一个完整的解释如下:

key   operation     register used   notes
y     yank          "" "0 and "1
x     del 1 char    "1              why doesn't xxxxxx fill all registers?
dd    del line      "" and "1
d[?]  del [motion]  "1

a p (put) with no specified register will put from register "1 (I think)

if an operation uses register "1 to store deleted/yanked text, then "1's
previous contents will be pushed to "2 and so on up to register "9 whose
previous content will disappear.

a "[alphanumeric] (quote followed by alphanumeric) before a d or y will
put the result into that register in addition to the registers it would
normally go in.
Run Code Online (Sandbox Code Playgroud)

是的,这个问题在人们询问某个特定操作的详细信息时多次被部分重复.如果有任何我错过的操作将文本放入删除或抽屉寄存器中,我也想知道这些操作.

Ing*_*kat 5

你应该能够找到完整的解释:help "0.您的摘要大多是正确的,但是,您在小删除中缺失,这些删除会进入特殊"-注册.

key   operation     register used     notes
y     yank          "" and "0
x     del 1 char    "" and "-         small delete register
dd    del line      "" and "1
d[?]  del [motion]  "" and ("1 or "-) depending on the length of the text

a p (put) with no specified register will put from the default register ""
Run Code Online (Sandbox Code Playgroud)