This repository has been archived by the owner on Apr 24, 2022. It is now read-only.
Changes
Key Combos
Timeouts
- Add
g:libmodalTimeouts
and mode-specific timeout variables. - Modes can now optionally time-out when waiting for user input (input will clear, just like in normal mode).
- This will only occur if the user has entered a key that has a mapping in the
modeCombos
dict. Otherwise, the user's input will be automatically cleared.
- This will only occur if the user has entered a key that has a mapping in the
- Timeouts are not implemented for
modeCallback
s— they must be implemented by mode creators usingtimers
.
Cloberring
-
Key combos no longer clobber each other when they share beginnings that are shorter.
- e.g.
zfo
used to wipe out anyz
orzf
mappings (althoughzfx
would work just fine).
- e.g.
-
When a combo has both a command and sub-mappings, it is now automatically mapped to
<CR>
.- e.g.:
let s:modeCombos = { \ 'z': 'split', \ 'zf': 'tabnew' \ 'zfo': 'tabclose' \}
Is now translated to:
let s:internalModeCombos = { \ 'z': { \ '<CR>': 'split', \ 'f': { \ '<CR>': 'tabnew', \ 'o': 'tabclose' \ } \ } \}
- Dictionaries are not expanded to include
<CR>
annotations until necessary, in order to be more space-efficient.
-
Unfortunately, the
g:libmodalTimeout
feature will not automatically execute these commands for you.- This is a limitation of Vimscript. There is a rewrite of this plugin being developed for Neovim only that is capable of doing this and more (find it here when it is complete).