Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top