mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 18:38:00 +00:00
[Fix #563] Control+Arrow keys are not in the terminfo database
This commit is contained in:
parent
36ade25eb6
commit
9b1f39f267
@ -29,6 +29,8 @@ zmodload zsh/terminfo
|
|||||||
typeset -gA key_info
|
typeset -gA key_info
|
||||||
key_info=(
|
key_info=(
|
||||||
'Control' '\C-'
|
'Control' '\C-'
|
||||||
|
'ControlLeft' '\e[1;5D \e[5D \e\e[D \eOd'
|
||||||
|
'ControlRight' '\e[1;5C \e[5C \e\e[C \eOc'
|
||||||
'Escape' '\e'
|
'Escape' '\e'
|
||||||
'Meta' '\M-'
|
'Meta' '\M-'
|
||||||
'Backspace' "^?"
|
'Backspace' "^?"
|
||||||
@ -206,10 +208,10 @@ bindkey -d
|
|||||||
# Emacs Key Bindings
|
# Emacs Key Bindings
|
||||||
#
|
#
|
||||||
|
|
||||||
for key ("$key_info[Escape]"{B,b}) bindkey -M emacs "$key" emacs-backward-word
|
for key in "$key_info[Escape]"{B,b} "${(s: :)key_info[ControlLeft]}"
|
||||||
for key ("$key_info[Escape]"{F,f}) bindkey -M emacs "$key" emacs-forward-word
|
bindkey -M emacs "$key" emacs-backward-word
|
||||||
bindkey -M emacs "$key_info[Escape]$key_info[Left]" emacs-backward-word
|
for key in "$key_info[Escape]"{F,f} "${(s: :)key_info[ControlRight]}"
|
||||||
bindkey -M emacs "$key_info[Escape]$key_info[Right]" emacs-forward-word
|
bindkey -M emacs "$key" emacs-forward-word
|
||||||
|
|
||||||
# Kill to the beginning of the line.
|
# Kill to the beginning of the line.
|
||||||
for key in "$key_info[Escape]"{K,k}
|
for key in "$key_info[Escape]"{K,k}
|
||||||
|
Loading…
Reference in New Issue
Block a user