onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.36k stars 300 forks source link

Linux: Middleclick paste #1068

Open topaxi opened 6 years ago

topaxi commented 6 years ago

It would be very nice to support Linux-like middleclick paste. I'm very used to middleclick paste the current clipboard contents.

Behavior in Terminals and GVIM:

badosu commented 6 years ago

@topaxi As a workaround you can use the * register.

bryphe commented 6 years ago

Thanks for the workaround, @badosu !

Thinking of #973 - do you think this makes sense to be something we provide as part of our default configuration, on Linux?

badosu commented 6 years ago

It seems this has been an issue on atom as well, see:

badosu commented 6 years ago

@bryphe This is not something actually related to Vim, except the integration from X11 to the * register so I would not say it's related to #973.

This is the behaviour expected for any app that runs under X11 (that probably will or should not be expected to work when Wayland gets mainstream usage), and I was surprised that electron did not support it by default.

Anyway, if it's an easy enough fix should make the linux experience a lot better.

badosu commented 6 years ago

Just one thing that is important to keep in mind, usually there are two registers the normal clipboard (C-C, C-V) and this 'selection clipboard'.

The solution integrated by atom does not seem to be the best one, so I recommend atom/atom#3027 as a better reference.

There's an even better way, that is to use the same thing that Vim uses (the * register). If it's not supported by your vim configuration then it probably should not on Oni.