0

When I doing :%y+ in a vim session on the remote host,
I actually saved the content into remote host clipboard, right?

Is there a way that I can redirect such content of :%y+ from remote host clipboard to my local clipboard?


PS:
I worked on a tmux-client iterm2, using ssh to connect to remote host.
I know how to transfer file use scp and rsync, and I can select copy the remote vim content.
But I'm really curious about how to redirect the content from remote server clipboard to local clipboard.

  • There's no such thing as “the remote host clipboard” unless you're doing something unusual: there's a clipboard per X server, not per machine, and you wouldn't normally be running an X server on the remote machine. But your description of where you're running Vim isn't clear. Is Vim started from the SSH session, or is it inside a Tmux session with the tmux process running on the remote host? In Vim, what does :!echo $DISPLAY show? – Gilles Mar 14 '15 at 12:27
  • @Gilles, it shows nothing. I ssh to the remote host in my tmux, and then open a vim interface in the same screen split. By using :%y+ on it, I got nothing to my clipboard. – Zen Mar 14 '15 at 12:39

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.