mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-23 01:17:59 +00:00
Rename $editor_keymap_info to $editor_info[keymap]
This commit is contained in:
parent
9e6df0511e
commit
64da1ed627
@ -44,7 +44,7 @@ zle -N edit-command-line
|
|||||||
|
|
||||||
# Use human-friendly identifiers.
|
# Use human-friendly identifiers.
|
||||||
zmodload zsh/terminfo
|
zmodload zsh/terminfo
|
||||||
typeset -gA key_info
|
typeset -gA key_info editor_info
|
||||||
key_info=(
|
key_info=(
|
||||||
'Control' '\C-'
|
'Control' '\C-'
|
||||||
'Escape' '\e'
|
'Escape' '\e'
|
||||||
@ -86,10 +86,15 @@ done
|
|||||||
# Displays the current vi mode.
|
# Displays the current vi mode.
|
||||||
function zle-line-init zle-line-finish zle-keymap-select {
|
function zle-line-init zle-line-finish zle-keymap-select {
|
||||||
if [[ "$KEYMAP" == 'vicmd' ]]; then
|
if [[ "$KEYMAP" == 'vicmd' ]]; then
|
||||||
zstyle -s ':omz:module:editor:keymap' alternate 'editor_keymap_info'
|
zstyle -s ':omz:module:editor:keymap' alternate 'REPLY'
|
||||||
else
|
else
|
||||||
zstyle -s ':omz:module:editor:keymap' primary 'editor_keymap_info'
|
zstyle -s ':omz:module:editor:keymap' primary 'REPLY'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
editor_info[keymap]="$REPLY"
|
||||||
|
|
||||||
|
unset REPLY
|
||||||
|
|
||||||
zle reset-prompt
|
zle reset-prompt
|
||||||
zle -R
|
zle -R
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ function prompt_sorin_setup {
|
|||||||
'rprompt' '%A%B%S%a%d%m%r%U%u'
|
'rprompt' '%A%B%S%a%d%m%r%U%u'
|
||||||
|
|
||||||
PROMPT='%F{cyan}%1~%f${(e)git_info[prompt]} %(!.%B%F{red}#%f%b.%B%F{green}❯%f%b) '
|
PROMPT='%F{cyan}%1~%f${(e)git_info[prompt]} %(!.%B%F{red}#%f%b.%B%F{green}❯%f%b) '
|
||||||
RPROMPT='${editor_keymap_info}%(?:: %F{red}⏎%f)${VIM:+" %B%F{green}V%f%b"}${git_info[rprompt]}'
|
RPROMPT='${editor_info[keymap]}%(?:: %F{red}⏎%f)${VIM:+" %B%F{green}V%f%b"}${git_info[rprompt]}'
|
||||||
SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '
|
SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user