bugaevc / wl-clipboard

Command-line copy/paste utilities for Wayland
GNU General Public License v3.0
1.62k stars 60 forks source link

wl-paste from VIM in alacritty on sway #64

Closed krnl0138 closed 5 years ago

krnl0138 commented 5 years ago

Hello, everything is fine, except i cannot paste when I copy text in VIM on Sway-Wayland. wl-paste and wl-paste -p give me previous copyings. In VIM you can do "*y and "+y commands in order to copy to primary and to clipboard accordingly, but both registers do not accept the copied text.

What did I do wrong? And where should I find the problem? Cuz I know sway+vim+alacritty -- are not the best friends ever.

gvim 8.1.1968-1 wl-clipboard-git r184.a60a0a4-1 alacritty 0.3.3-3 wlroots-git 0.7.0.r2.gbf90474b-1 wayland 1.17.0-1 sway-git r6051.c11c8a58-1

krnl0138 commented 5 years ago

I closed it because I tried to install st and it worked, so I thought 'ok, smth is wrong w/ alacritty', but then I found something strange. If i open 2 terminals -- st and alacritty by side and copy smth from alacritty nothing will work, but if I copy first from st and then try to copy from the alacritty's window in VIM -- it copied totally fine. If i quit the VIM in alacritty and reopen file -- I cannot copy again. It is very bizzare.

bugaevc commented 5 years ago

Cuz I know sway+vim+alacritty -- are not the best friends ever.

Why, they pretty much are, as long as you're talking about neovim, not gvim. Because neovim users wl-clipboard internally to do copying and pasting, and I haven't heard any such thing about gvim.

So if it doesn't use wl-clipboard, do you expect it to implement copying and pasting on Wayland some other way? (Directly using Wayland?)

And if it doesn't support copying and pasting on Wayland, why do you think this is a wl-clipboard bug? Are you able to paste into any other Wayland-native app after copying from gvim?

bugaevc commented 5 years ago

Let me rephrase that.

There are two ways that wl-clipboard could be involved here:

krnl0138 commented 5 years ago

Thanks a lot, now I understand the situation. Yes, neovim works like a charm!

bugaevc commented 5 years ago

So since everything seems to be working as expected, I'll close this issue :smile: