[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.
main
Samantha McVey 8 years ago committed by Kaleb Elwert
parent 5ef10f7658
commit dbe9a5ea28

@ -274,6 +274,14 @@ fi
# Emacs and Vi Key Bindings # 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 for keymap in 'emacs' 'viins'; do
bindkey -M "$keymap" "$key_info[Home]" beginning-of-line bindkey -M "$keymap" "$key_info[Home]" beginning-of-line
bindkey -M "$keymap" "$key_info[End]" end-of-line bindkey -M "$keymap" "$key_info[End]" end-of-line

Loading…
Cancel
Save