zsh-vi-mode icon indicating copy to clipboard operation
zsh-vi-mode copied to clipboard

Support custom multiple escape key bindings in the same mode

Open jeffreytse opened this issue 3 years ago • 0 comments

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
}

jeffreytse avatar Mar 31 '21 13:03 jeffreytse