preservim / vim-textobj-quote

Use ‘curly’ quote characters in Vim
Other
123 stars 6 forks source link

textobj-quote doesn't work with certain easyclip settings #15

Open ltratt opened 7 years ago

ltratt commented 7 years ago

Not that this is exactly textobj-quote's fault, but if easyclip is configured as follows (which is what the easyclip documentation reccomends):

set clipboard=unnamed

then ReplaceWithCurly and friends don't make any change to the text because pasting no longer uses the " register. It seems that using set clipboard=unnamedplus fixes this problem, although I haven't fully worked out if it has other knock-on effects.

I guess textobj-quote could check for easyclip's existence and alter the paste register it uses; or maybe even documenting the issue might be enough?

reedes commented 7 years ago

Sorry for the delay.

I'll try to reproduce this in the next week or two. Ideally this plugin can detect when the clipboard setting has changed, and restore it afterwards. Thanks.

alerque commented 4 years ago

Detecting the clipboard setting, changing it to something else, then reverting is a terrible idea these days. Maybe it wasn't in 2017, but Vim and Neovim handle this differently, and many platforms simply don't support the same clipboard options. I think we need a different mechanism entirely. I'm guessing there is a way to hook into the register functions directly such that we can use a private one that is unaffected by user settings, other plugins, or platform support.