simnalamburt / vim-mundo

:christmas_tree: Vim undo tree visualizer
https://simnalamburt.github.io/vim-mundo
GNU General Public License v2.0
792 stars 28 forks source link

No good way to add <nowait> to mappings #116

Open arp242 opened 3 years ago

arp242 commented 3 years ago

I'd like to add <nowait> to the mundo mappings, so e.g. q doesn't wait on the timeout and is immediate.

Adding this by default can be surprising, so that's probably not a good idea. Right now the only way is remapping everything with:

let g:mundo_mappings = {
    \ '<nowait> q': 'quit',
    [..]
\}

Which isn't ideal, and the only reason it works now is probably an (unexpected) implementation detail as it does:

exec 'nnoremap <script> <silent> <buffer> ' . a:mapping .' '. a:action

But this can change in the future.

Maybe add a g:mundo_mappings_nowait setting? Or maybe something else? Usually I'm not a huge fan of adding settings, but I don't really see a good alternative.

Anyway, let me know and I can write a patch.