vim-leader-guide
vim-leader-guide copied to clipboard
Handling for default keybinds
I have the following keybinds for the z prefix:
n zs * <Esc>:set foldmethod=syntax<CR>zR
n zi * <Esc>:set foldmethod=indent<CR>zR
n zm * <Esc>:set foldmethod=marker<CR>zR
n z * :<C-U>LeaderGuide 'z'<CR>
However, this seems to disable default keybindings like za. Is there a way to pass them through?
Sorry for the late reply. This turns out to be surprisingly tricky problem. The z* default bindings are handled different from mappings. For some reason the z mapping is always triggered when invoking a z* command like zz.
A possible workaround is to redefine all the default commands as mappings:
nnoremap zz zz
nnoremap z+ z+
nnoremap z- z-
nnoremap z. z.
nnoremap z= z=
etc.
This is admittedly not all that great. I will definitely look for a better solution.