I rebind the hjkl
movement scheme to jkl;
in vim / evil mode and want to figure out how to do this in zsh as well. I tried the following but it doesn't seem to do anything:
bindkey '\ej' backward-char
bindkey '\e;' forward-char
bindkey '\ek' down-history
bindkey '\el' up-history
Does anyone know the command names to do this and how to use normal mode binds?
In addition, how do I bind h
to what is normally ;
?
I think you want the following:
# Add bindings to the vicmd keymap
bindkey -a j backward-char
bindkey -a ';' forward-char
bindkey -a k down-history
bindkey -a l up-history
I'm not entirely sure how to copy a key binding, but since ;
is bound to vi-repeat-find
by default, you can add
bindkey -a h vi-repeat-find
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.