What I want to do is have two mappings. One mapped to <s-k>
, and one mapped to <s-k><s-k>
. What happens right now is that if I press <s-k>
vim
delays for timeoutlen
ms, and if I don't press anything it does the <s-k>
action, and if I press another <s-k>
in that time it does the <s-k><s-k>
action.
However, what I want it to do is do BOTH, i.e. if I press <s-k>
it will do the <s-k>
action immediately, and if I press another <s-k>
in the timeoutlen
period, it will do the second command as well.
<s-k>
(btw isn't that justK
?) that controls whether it's called once or twice (hint: use a global or script variable) and acts accordingly. You can use theCursorHold
orCursorMoved
events to reset the variable, that's probably close enough to thetimeoutlen
behavior, if not exactly the same...KK
, should both mappings take effect? Or only the second?