简体   繁体   中英

Vim copy to system clipboard works but can't paste on the same terminal

I can copy text into the system clipboard in 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.

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).

One of the methods of copying to/fro vim/terminal that often works is performing both operations (copying and pasting) with SHIFT key pressed.

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.

Use :sh to turn back to terminal and CTRL+D to vim.

In my case I can't use CTRL+Z and fg to paste what I have copied.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM