The image below shows two terminals. Both are running vim instances on remote machines (ssh and a serial connection through an UART cable).

Vim's on those machines don't have a way to access the system clipboard since they are running on physically different machines.

The only way I know to copy content between them is by using the mouse (as shown in the video).

I'm looking for suggestions on how to do this without needing to leave the keyboard. I know the window switching can be solved with introducing tmux, but how to solve the problem of a shared copy register?

Some kind of integration with xterm?

enter image description here

  • If you are going to use tmux to switch between the two sessions why not use its copy buffer? Also you might want to check :h clientserver – statox Mar 8 '19 at 10:48
  • If the remote machine's vim supports it you can use ssh -Y and register "+ – Mass Mar 8 '19 at 12:06
  • If you're using mouse to copy anyway, you should be able to do exact same thing with tmux. I don't have any idea of native vim solution though. – klaus Mar 8 '19 at 12:38
  • Did you see :help clipboard-tool? – Arnie97 May 21 '19 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.