[英]Vim copy to system clipboard works but can't paste on the same terminal
I can copy text into the system clipboard in vim. 我可以将文本复制到vim的系统剪贴板中。 Assume that vim was opened in terminal window A. I can paste the text in terminal window B but can't paste in terminal A. Also once I try to paste in terminal A, then the data seems to be cleared from the clipboard, I can't paste anymore in terminal B.
假设vim是在终端窗口A中打开的。我可以在终端窗口B中粘贴文本,但不能在终端A中粘贴。同样,一旦我尝试在终端A中粘贴,那么数据似乎已从剪贴板中清除了,我不能再粘贴到终端B中了。
Has anyone come across this issue or know what might be happening? 有谁遇到这个问题或知道会发生什么?
Your experience may very enormously depending what x-terminal emulator you use and if you use a terminal multiplexer (and which). 您的经验可能非常取决于您使用的x终端仿真器以及是否使用终端多路复用器(以及使用哪种)。
One of the methods of copying to/fro vim/terminal that often works is performing both operations (copying and pasting) with SHIFT
key pressed. 复制到/来回vim /终端的一种常用方法是按下
SHIFT
键执行两项操作(复制和粘贴)。
Above works if you do not use CTRL+c
/ CTRL+v
for copy paste, which means you only use selecting with left mouse click&drag and pasting with middle click. 如果您不使用
CTRL+c
/ CTRL+v
进行复制粘贴,则上述方法适用,这意味着您仅可以使用鼠标左键单击并拖动选择和单击中键进行粘贴。
Use :sh
to turn back to terminal and CTRL+D
to vim. 使用
:sh
返回到终端,然后按CTRL+D
到vim。
In my case I can't use CTRL+Z
and fg
to paste what I have copied. 就我而言, 我无法使用
CTRL+Z
和fg
粘贴复制的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.