svermeulen / vim-easyclip

Simplified clipboard functionality for Vim
693 stars 21 forks source link

p<c-p> in Neovim #109

Open coachshea opened 6 years ago

coachshea commented 6 years ago

I had a similar issue approximately two years ago and you were able to help me. I have since switched to neovim and the (almost identical) issue has recurred, but the previous solution isn't working.

Basically, after I paste text, I hit \ and nothing happens. If I type \ again, I get the message, "last action was not paste, swap ignored." I have tried removing all plugins except vim-easyclip (and also all but vim-easyclip and vim-repeat) and the same thing happens. I have tried it in vim (with all plugins enabled) and it still works, so I can only assume that it is a Neovim issue. Any help is greatly appreciated.

coachshea commented 6 years ago

After some more digging, I found a very odd behavior that might shed some light on the issue. I was curious as to why I only got the message on the second press of \, so I started hitting it once and then pressing 'p' again. It appears that the first press of \ (and \) is behaving as [y and ]y are supposed to act (if mapped, which mine aren't). Why this is happening and why it is only happening on the first press is a mystery to me, but I hope that might shed some light on the issue. Thanks again for all your help and for this great plugin.

vvbandeira commented 6 years ago

Hi,

I'm having the same problem. Although I am using vim not neovim. My vim --version. I tested with both 7.4 and 8.0 https://pastebin.com/6rPYYhz6

My vimrc file:

silent! call plug#begin('~/.vim/plugged')
Plug 'svermeulen/vim-easyclip' | Plug 'tpope/vim-repeat'
filetype plugin indent on
call plug#end()

Also, another weird behaivour, that might not be related. If you do p<c-p> it acts like [y as @coachshea said. But if you paste more then two times, the old 'value' comes back.

Example File:

A
B
C

Commands executed (cursor starts in first line):

yy
j
yy
j
yy
p<c-p><c-p>
p
p
p

File after commands with vim outputs:

A
B
C
C ' On first <c-p> outputs: 1 line less; before #33 0 seconds ago
  ' On second <c-p> outputs: Last action was not paste, swap ignored
B
B
C
simonsmith commented 6 years ago

Setting let g:EasyClipUsePasteDefaults = 0 fixed it for me

coachshea commented 6 years ago

That turns of the feature completely for me.

philFernandez commented 6 years ago

I am having the same exact issue. I cannot toggle through my yanks. I'm having the same behavior as described by the OP's first post here. I'm using vim 8.

mg979 commented 6 years ago

Same here, yank cycling doesn't work at all. Vim 8.

sassanh commented 6 years ago

It doesn't work on my NeoVim too.

philFernandez commented 6 years ago

I just want to report that I've switched branches from the master branch to the YankRingStyleSwap branch. Everything seems to be working perfectly for me on Vim8 using this branch, including yank cycling.

sassanh commented 6 years ago

That branch is last updated in 2013, you could checkout an early commit in master branch and it should work too. I'm pretty sure the problem didn't exist few month ago.

philFernandez commented 6 years ago

Thanks for the heads up. I'm testing the YankRingStyleSwap branch right now, and it's working perfectly. If it starts giving me problems I'll give your suggestion a try. Thanks

belugame commented 6 years ago

I'm also having this problem on neovim

svermeulen commented 6 years ago

I'll take a look at this when I upgrade to neovim next month, but if anyone wants to help in the meantime that would be great

ltratt commented 6 years ago

I can confirm this problem still exists; the YankRingStyleSwap branch doesn't really work well any more (it causes extra text to be pasted from time to time).

svermeulen commented 5 years ago

Ok I finally migrated to neovim. As stated now at the top of the readme, easyclip is being split up into three new plugins that target Vim 8 / Neovim, including one with the yank swapping functionality working again (nvim-yoink)

Herz3h commented 4 years ago

It would be nice to emphasize that (the plugins splits) even more on the readme imo. I had the same problem as in the issue, and spent some time trying different options in my vimrc until I found this.