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

use TextYankRing autocmd instead of hacking mappings when possible #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bennyyip
Copy link

@bennyyip bennyyip commented Dec 20, 2018

Vim8 and NeoVim have TextYankRing autocmd now. With this feature, we can easily get register type and register content when something puts into it, without hacking mappings.

@dfishburn
Copy link
Contributor

Thanks for mentioning the new autocmd TextYankPost.

I have looked into it and made some preliminary changes to test things out.

That feature only works on yanked and deleted text.

The YankRing works on much more than that. For example, when you change text, the YankRing stores the previous values.

Using this feature does in fact remove a lot of maps, but certainly not all of them to keep the features in tact.

I will release a new version which uses this feature.

@bennyyip
Copy link
Author

bennyyip commented Jan 2, 2019

Looking forward to the new YankRing!

@khmelevskii
Copy link

This plugin works slow in neovim. When I try to delete and copy line, I have a large delay.

@dfishburn
Copy link
Contributor

dfishburn commented Jan 13, 2019

The delay sounds like conflicting maps.

Can you create this file bare_bones.vim:

nnoremap <silent> <Leader>yr :YRSearch<CR>
nnoremap <silent> <F11> :YRShow<CR>

source c:\vim\vimfiles\plugin\yankring.vim

Then start Vim using:

gvim -N --noplugins -u bare_bones.vim -U bare_bones.vim

Then try your test again.

If it is still slow, then please show exactly what you are doing that is slow, key stroke for key stroke.

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

Successfully merging this pull request may close these issues.

3 participants