mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 18:38:00 +00:00
[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
@ -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…
Reference in New Issue
Block a user