zsh-vi-mode
zsh-vi-mode copied to clipboard
Support custom multiple escape key bindings in the same mode
Currently, the escape bindkey option (e.g. ZVM_VI_INSERT_ESCAPE_BINDKEY
) supports bind only one, however, there are some requirement of multiple escape keybindings such as #76, so it should be enhanced.
For now, you can do by below code snippet:
# Default escape key <ESC> for insert mode
ZVM_VI_INSERT_ESCAPE_BINDKEY='^['
# The plugin will auto execute this zvm_after_init function
function zvm_after_init() {
zvm_bindkey viins 'jk' zvm_exit_insert_mode
zvm_bindkey viins 'kj' zvm_exit_insert_mode
}