remap zsh terminal hotkey
Вопрос
I'm using the yadr dotfiles and ZSH on my mac. I use the delimiter "jj" to switch from insert to edit mode in vim, and I did that by putting
imap jj <esc>
in ~/.gvimrc. However, zsh / yadr also allows you to use vim hotkeys in terminal but adding that line to .gvimrc didn't seem to change the hotkey from escape to jj in this setting. Any thoughts on how I can do that?
Решение
yard does not take the Vim keybindings from ~/.gvimrc
and use those to set Zsh keybindings. Vim and Zsh are configured separately.
yard enables a few specific keybindings which can be found here. As @pb2q points out you will have to add bindkey -M viins 'jj' vi-cmd-mode
to that file to get the behavior you're looking for.
Не связан с StackOverflow