https://stackoverflow.com/questions/1497958/how-do-i-use-vim-registers
https://vi.stackexchange.com/questions/84/how-can-i-copy-text-to-the-system-clipboard-from-vim
1. "a : " + 字母/数字 即为使用该寄存器
对应于系统剪贴板的寄存器:星号,或加号 :
*
uses PRIMARY; mnemonic: Star is Select (for copy-on-select)+
uses CLIPBOARD; mnemonic: CTRL PLUS C (for the common keybind)
其他特殊寄存器:
0
(yank register: when you usey
in normal mode, without specifying a register, yanked text goes there and also to the default register),1
to9
(shifting delete registers, when you use commands such asc
ord
, what has been deleted goes to register 1, what was in register 1 goes to register 2, etc.),"
(default register, also known as unnamed register. This is where the " comes in Ctrl-R, "),a
toz
for your own use (capitalizedA
toZ
are for appending to corresponding registers)._
(acts like/dev/null
(Unix) orNUL
(Windows), you can write to it but it's discarded and when you read from it, it is always empty),-
(small delete register),/
(search pattern register, updated when you look for text with/
,?
,*
or#
for instance; you can also write to it to dynamically change the search pattern),:
(stores last VimL typed command viaQ
or:
, readonly),+
and*
(system clipboard registers, you can write to them to set the clipboard and read the clipboard contents from them)
2. 寄存器 + 动作(y/d等)+ 移动位置: 把对应内容拷贝到相应寄存器
"kyy
把相应内容拷贝到k寄存器
https://stackoverflow.com/questions/1497958/how-do-i-use-vim-registers