I've added following code at the end of my .zshrc
:
export VISUAL=vim
autoload edit-command-line; zle -N edit-command-line
bindkey -M vicmd v edit-command-line
When I restart the shell, it works perfectly but all previous key bindings stop working.
I'm unable to search history (CTRL-R) and I'm unable to move in command line (CTRL-A/E) for example.
Maybe I placed these commands in the wrong place?
Any help, very appreciated!
bindkey '^R' history-incremental-search-backward
restoresCTRL-R
(notCTRL-A/E
). Addingbindkey -e
works but I lost the ability to invokevi
usingESC-V
. What am I doing wrong? Thanks for your time. – gsscoder Nov 15 '19 at 17:53vim
as editor and just keepCTRL-A/E
to move directly in terminal. I've achieved it with this two commands:bindkey '^A' beginning-of-line
andbindkey '^E' end-of-line
. In https://gist.github.com/gsscoder/6466d661e66b09131f9c0d0945e386d5 it's possible to see all commands I add to my.zprofile
. – gsscoder Nov 16 '19 at 06:46