first your vim should be compiled with +clipboard
see vim --version | grep 'clipboard'
To copy ( or delete ) in any vim register you can use the following syntex
"<register name><oprator><motion>
(see :h registers
)e.g.
"ayy
(copy current line in register a
) or"bdd
(delete current line in register b
) or"*ce
(delete to the end of the current work and place content in register *
using c
will also put you in insert modeyy
+
or *
( depending on the os )so to copy the whole line into system clipboard you can use
"*yy
or "+yy
(depending on the os)or to copy 2 lines
"*2yy
or "+2yy
( to copy current and the line after current line )将内容复制到系统剪贴板后,您可以使用(或)将其粘贴到tmux中command + v
ctrl + shift + v
或使用tmux粘贴缓冲区映射系统剪贴板,请参见https://unix.stackexchange.com/questions/67673/copy-paste-text-selections-between-tmux-and-the-clipboard#72340
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句