bfredl / nvim-miniyank

killring-alike plugin for neovim and vim 8 with no default mappings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Miniyank conflicts with auto save autocmd

0xC0FFEE opened this issue · comments

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.

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.

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.

commented

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