add keybinds for vi-mode

This commit is contained in:
Tran Sang 2017-04-30 02:11:30 +09:00
parent 5667161d49
commit cd66ce5daf

View File

@ -27,6 +27,8 @@ bindkey '^N' down-history
bindkey '^?' backward-delete-char bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char bindkey '^h' backward-delete-char
bindkey '^w' backward-kill-word bindkey '^w' backward-kill-word
bindkey '^k' kill-line
bindkey '^y' yank
# allow ctrl-r to perform backward search in history # allow ctrl-r to perform backward search in history
bindkey '^r' history-incremental-search-backward bindkey '^r' history-incremental-search-backward
@ -35,6 +37,10 @@ bindkey '^r' history-incremental-search-backward
bindkey '^a' beginning-of-line bindkey '^a' beginning-of-line
bindkey '^e' end-of-line bindkey '^e' end-of-line
# char movement
bindkey '^b' backward-char
bindkey '^f' forward-char
# if mode indicator wasn't setup by theme, define default # if mode indicator wasn't setup by theme, define default
if [[ "$MODE_INDICATOR" == "" ]]; then if [[ "$MODE_INDICATOR" == "" ]]; then
MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"