[editor] set forward/backward word for Ctrl+Right Ctrl+Left
Set forward/backward word to be mapped the same as they are in vim, instead of having weird functionality when unset.
This commit is contained in:
parent
5ef10f7658
commit
dbe9a5ea28
1 changed files with 8 additions and 0 deletions
|
@ -274,6 +274,14 @@ fi
|
|||
# Emacs and Vi Key Bindings
|
||||
#
|
||||
|
||||
# Ctrl + Left and Ctrl + Right bindings to forward/backward word
|
||||
for keymap in viins vicmd; do
|
||||
for key in "${(s: :)key_info[ControlLeft]}"
|
||||
bindkey -M "$keymap" "$key" vi-backward-word
|
||||
for key in "${(s: :)key_info[ControlRight]}"
|
||||
bindkey -M "$keymap" "$key" vi-forward-word
|
||||
done
|
||||
|
||||
for keymap in 'emacs' 'viins'; do
|
||||
bindkey -M "$keymap" "$key_info[Home]" beginning-of-line
|
||||
bindkey -M "$keymap" "$key_info[End]" end-of-line
|
||||
|
|
Loading…
Reference in a new issue