I've not heard of such a plugin (doesn't mean it doesn't exist). But I can lay out an alternative approach...
Instead of dealing with multiple systems and their disparate clipboard configurations use your local vim
(+netrw) to edit remote files. Since you mention accessing remote systems with ssh
then vim
can use scp
, for one. Let's say you want to update a text file in a remote home directory...
:Nread scp://my.name@example.com/~/file.txt
Or even...
:e scp://my.name@example.com/~/file.txt
Works from the command line, too. ($ vim scp://etc
).
Now you can cut and paste to your heart's content using just the local clipboard.
Other protocols are available including these (:h netrw-read
for complete list):
:Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
:Nread "http://[user@]machine/path" uses http
:Nread "rsync://[user@]machine[:port]/path" uses rsync
:Nread "scp://[user@]machine[[:#]port]/path" uses scp
More remote editing tips
If your workflow is more along the lines of impromptu use of vim
while you're doing work on the command line of a remote machine then check out out bcvi. Install this standalone script on a remote machine and then when you do vi file.txt
on the remote (e.g. during an ssh
session) your local [g]vim
will open the remote file automatically using the same underlying mechanism as described above.
Some outside the box thinking for you.
ssh -Y
might work for you