haya14busa / vim-poweryank

Copy text over SSH
MIT License
55 stars 0 forks source link

can it be used to replace vim's internal cut and yank? #1

Open amosbird opened 7 years ago

amosbird commented 7 years ago

i'd like to make all y... , d... and all other clipboard related commands work through ssh. can it be achieved?

haya14busa commented 7 years ago

That's good question. I also want such feature.

But, there are some problem like we cannot send arbitrarily large text to terminal through OSC52 (there is a character limit).

Maybe we can create mappings which just give up using OCS52 in such cases (with some messages). I'll try to create it.

amosbird commented 6 years ago

hello, any progress on this :) ? Can we have a wip workaround in the mean time? regards.

abouteiller commented 6 years ago

I'm also interested in having at least "* and "+ operate with osc52.

quic-mathbern commented 4 months ago

I've added this autocmd to my ~/.vimrc:

augroup ssh_clipboard
  au!
  au TextYankPost * call poweryank#opfunc_osc52(visualmode())
augroup END

So whenever I yank with y..., or d..., the plugin gets executed and the buffer is copied back over ssh.