ojroques / vim-oscyank

A Vim plugin to copy text through SSH with OSC52
BSD 2-Clause "Simplified" License
615 stars 38 forks source link

Via SSH to Windows? #21

Closed erwin closed 1 year ago

erwin commented 2 years ago

I'm trying to port a Linux app to Windows, and thus running neovim under Windows, via OpenSSH on Windows, so that Clangd picks up all the appropriate libraries for completion...

Most of the neovim plugins work as expected, but I haven't been able to get vim-oscyank to work.

I wrote a simple C program to test copying via osc52 from cmd.exe, and it works fine on the command line, so we should be able to make this work.

printf("\x1b]52;c;aGVsbG8gdmltLW9zY3lhbmsK\x07");

Looking at function! s:raw_echo(str), for neovim on Windows it should be calling:

call chansend(v:stderr, a:str)

However even though my C command works just fine, I can't get the following to work in neovim, even directly on the windows desktop, where OSCYank seems to call the same command and does work.

call chansend(v:stderr, '\x1b]52;c;aGVsbG8uLi5uZW8uLi52aW0K\x07')

Note:

To completely painlessly spin up VMs on your Linux box, even Mac and Windows VMs, Quickemu is the best solution I've ever seen... Literally 2 commands and you'll have your VM going.

https://github.com/quickemu-project/quickemu

ojroques commented 1 year ago

I've deeply refactored the code so maybe it works now. Feel free to re-open it if the problem persists.