cknadler / vim-anywhere

Use Vim everywhere you've always wanted to
MIT License
3.66k stars 146 forks source link

Changing xclip to xsel for Linux #90

Open verysure opened 6 years ago

verysure commented 6 years ago

First of all, thanks for the awesome app.

I encountered similar issues on disappearing newlines to issue #21 . After some digging, I think the reason is xclip (see link below). It seems to be a bug with xclip, which I cannot not find any solution online. https://unix.stackexchange.com/questions/384086/why-does-xclip-copied-text-pasted-into-gmail-on-firefox-turn-line-breaks-into-sp

Another alternative is xsel. By replacing xclip -selection clipboard to xsel --clipboard, I was able to correctly paste to gmail (and google doc).

This should be a fairly easy fix and I can submit a pull request. However, I would like to know different opinions since it changes dependencies.

cknadler commented 6 years ago

Hey verysure,

Thanks for the bug report! Do you know if xsel is standard on Linux installs? Seems like a reasonable solution if it is, I'm just worried about compatibility. I'm not currently using Linux, so if anyone else is, feel free to comment with suggestions.

verysure commented 6 years ago

Hi cknadler,

Yeah, that's also the issue for submitting dependency changes for Linux. I know kubuntu 17.10 works and the package seems to exist in major repositories. Maybe putting it in FAQ as a suggestion is enough?

(also, I find that a more robust change is xsel --input --clipboard, xsel doesn't pick up for some hotkey managers)

Thanks!