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

Miniyank conflicts with auto save autocmd #18

Open
0xC0FFEE opened this issue Jul 28, 2018 · 3 comments
Open

Miniyank conflicts with auto save autocmd #18

0xC0FFEE opened this issue Jul 28, 2018 · 3 comments

Comments

@0xC0FFEE
Copy link

0xC0FFEE commented Jul 28, 2018

I'm observing a conflict between my auto save autocmd and miniyank. Instead of cycling though the yank stack nothing seems to happen.

Here is the autocmd in question:

augroup auto_save
  autocmd!
  autocmd CursorHold,InsertLeave * silent! wall
augroup END

Is there a known workaround or is it possible to fix this somehow?

Btw: the same issue exists in vim-yankstack, which I currently use as my daily driver. I've just tested miniyank to see if it has the problem too.

@bfredl
Copy link
Owner

bfredl commented Jul 28, 2018

One option is to increase 'updatetime', it can give a X seconds window before saving you can cycle (it should reset for each cycle).

There might be possible to write a command MiniYankPreserve that will preserve miniyank over wa and other commands that increase changed tick without actual change, I might look into it.

@0xC0FFEE
Copy link
Author

Thank you for your swift response!

And you are absolutely right about the connection between updatetime, the CursorHold auto command and :wall.

Increasing updatetime seems like a good workaround for now; I'll give miniyank a try as my daily driver for a while.

Thanks again.

@ajitid
Copy link

ajitid commented Feb 18, 2022

Apparently you can decouple CursorHold time with updatetime using https://github.com/antoinemadec/FixCursorHold.nvim

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

3 participants