Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p<c-p> in Neovim #109

Open
coachshea opened this issue Feb 19, 2018 · 15 comments
Open

p<c-p> in Neovim #109

coachshea opened this issue Feb 19, 2018 · 15 comments

Comments

@coachshea
Copy link

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 <c-p> and nothing happens. If I type <c-p> 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
Copy link
Author

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 <c-p>, so I started hitting it once and then pressing 'p' again. It appears that the first press of <c-p> (and <c-n>) 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
Copy link

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
Copy link

Setting let g:EasyClipUsePasteDefaults = 0 fixed it for me

simonsmith added a commit to simonsmith/dotfiles that referenced this issue Feb 24, 2018
@coachshea
Copy link
Author

That turns of the feature completely for me.

@philFernandez
Copy link

philFernandez commented Mar 7, 2018

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
Copy link

mg979 commented Mar 7, 2018

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

@sassanh
Copy link
Contributor

sassanh commented Mar 10, 2018

It doesn't work on my NeoVim too.

@philFernandez
Copy link

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
Copy link
Contributor

sassanh commented Mar 10, 2018

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
Copy link

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
Copy link

I'm also having this problem on neovim

@svermeulen
Copy link
Owner

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
Copy link

ltratt commented Aug 7, 2018

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
Copy link
Owner

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
Copy link

Herz3h commented Jul 12, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants