feat(bindkeys): add {for,back}ward word

This commit is contained in:
George Rawlinson 2019-11-05 19:18:11 +13:00
parent 385527ed4c
commit 42663a579e
Signed by: grawlinson
GPG Key ID: E0959FEA8B550539
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,9 @@ zle -N down-line-or-beginning-search
[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" up-line-or-history
[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" down-line-or-history
[[ -n "${key[ShiftTab]}" ]] && bindkey -- "${key[ShiftTab]}" reverse-menu-complete
bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word
bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word
# make sure the terminal is in application mode when zle is active
# only then are the values from $terminfo valid