-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim-clipper assumes bsd netcat #2
Comments
Here's my attempt... It's not working and my vimscript is sh*te... function! clipper#private#clip() abort
if executable('nc') == 1
let l:address = get(g:, 'ClipperAddress', 'localhost')
let l:port = +(get(g:, 'ClipperPort', 8377)) " Co-erce to number.
if l:port
call system('nc ' . l:address . ' ' . l:port, @0)
else
if executable('socat') == 1
call system('socat - unix-client:' . l:address, @0)
else
call system('nc -U ' . l:address, @0)
endif
endif
else
echoerr 'Clipper: suitable executable does not exist'
endif
endfunction
Is there a way to pipe the cut data in via vimscript? |
Heh: I just did this dirty hack as my logic on the one above was wrong... This works, although it's fugly...
Checking yours out now. |
You could be quoting the wikipedia Vimscript page! |
Excellent. Thank you Greg... This works perfectly... Let me also take this opportunity to thank you for all your vim content and code... I'm an avid subscriber to your channel which is excellent! cheers 🍺 |
macOS has always shipped their specific version of |
You don't need two If you can think of an improvement that would be generally applicable, always open to PRs. |
like this?
|
Yeah, something like that. But like I said, it can be hard to come up with something that works universally for every possible distro, so that's why I suggested starting without something in your |
But Ubuntu is so popular maybe make an exception? CentOS requires a hassle anyway since they don't even install netcat by default. Or put this Ubuntu bug more prominently (for example in https://github.com/wincent/clipper#linux-example-setup)? You mentioned this in https://github.com/wincent/clipper#fixing-delays-when-sending-data-to-clipper-via-nc, but I thought it wasn't relevant: it's not a delay, the nc process doesn't terminate on reading EOF and hangs indefinitely. |
I installed clipper several months ago and didn't figure out the cause of this bug until now LOL. Personally I think clipper is much better than other tmux/vim clipboard integration plugins because I can copy from remote machine's vim session, which isn't possible with them. |
Yeah, but it came in via a third-party report. Like you say, it might not be discoverable enough. Sigh... well this project has 20 stars, so maybe I shouldn't be too worried breaking things. |
Make that 21 ;) |
So I took a stab at autodetection: #3 |
@wincent
Further to this wincent/clipper#19 I have indeed verified that bsd
netcat
is assumed to be installed.Would it be too much to ask for
socat
support?The text was updated successfully, but these errors were encountered: