Browse Source

Rename editor-info zstyle patterns

master
Sorin Ionescu 12 years ago
parent
commit
141a1ba947
  1. 20
      modules/editor/init.zsh
  2. 8
      modules/prompt/functions/prompt_sorin_setup

20
modules/editor/init.zsh

@ -18,27 +18,27 @@
# To indicate when the editor is in the primary keymap (emacs or viins), add # To indicate when the editor is in the primary keymap (emacs or viins), add
# the following to your theme prompt setup function. # the following to your theme prompt setup function.
# #
# zstyle ':prezto:module:editor:keymap' primary '>>>' # zstyle ':prezto:module:editor:info:keymap:primary' format '>>>'
# #
# To indicate when the editor is in the primary keymap (emacs or viins) insert # To indicate when the editor is in the primary keymap (emacs or viins) insert
# mode, add the following to your theme prompt setup function. # mode, add the following to your theme prompt setup function.
# #
# zstyle ':prezto:module:editor:keymap:primary' insert 'I' # zstyle ':prezto:module:editor:info:keymap:primary:insert' format 'I'
# #
# To indicate when the editor is in the primary keymap (emacs or viins) # To indicate when the editor is in the primary keymap (emacs or viins)
# overwrite mode, add the following to your theme prompt setup function. # overwrite mode, add the following to your theme prompt setup function.
# #
# zstyle ':prezto:module:editor:keymap:primary' overwrite 'O' # zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format 'O'
# #
# To indicate when the editor is in the alternate keymap (vicmd), add the # To indicate when the editor is in the alternate keymap (vicmd), add the
# following to your theme prompt setup function. # following to your theme prompt setup function.
# #
# zstyle ':prezto:module:editor:keymap' alternate '<<<' # zstyle ':prezto:module:editor:info:keymap:alternate' format '<<<'
# #
# To indicate when the editor is completing, add the following to your theme # To indicate when the editor is completing, add the following to your theme
# prompt setup function. # prompt setup function.
# #
# zstyle ':prezto:module:editor' completing '...' # zstyle ':prezto:module:editor:info:completing' format '...'
# #
# Return if requirements are not found. # Return if requirements are not found.
@ -119,17 +119,17 @@ function editor-info {
typeset -gA editor_info typeset -gA editor_info
if [[ "$KEYMAP" == 'vicmd' ]]; then if [[ "$KEYMAP" == 'vicmd' ]]; then
zstyle -s ':prezto:module:editor:keymap' alternate 'REPLY' zstyle -s ':prezto:module:editor:info:keymap:alternate' format 'REPLY'
editor_info[keymap]="$REPLY" editor_info[keymap]="$REPLY"
else else
zstyle -s ':prezto:module:editor:keymap' primary 'REPLY' zstyle -s ':prezto:module:editor:info:keymap:primary' format 'REPLY'
editor_info[keymap]="$REPLY" editor_info[keymap]="$REPLY"
if [[ "$ZLE_STATE" == *overwrite* ]]; then if [[ "$ZLE_STATE" == *overwrite* ]]; then
zstyle -s ':prezto:module:editor:keymap:primary' overwrite 'REPLY' zstyle -s ':prezto:module:editor:info:keymap:primary:overwrite' format 'REPLY'
editor_info[overwrite]="$REPLY" editor_info[overwrite]="$REPLY"
else else
zstyle -s ':prezto:module:editor:keymap:primary' insert 'REPLY' zstyle -s ':prezto:module:editor:info:keymap:primary:insert' format 'REPLY'
editor_info[overwrite]="$REPLY" editor_info[overwrite]="$REPLY"
fi fi
fi fi
@ -191,7 +191,7 @@ zle -N expand-dot-to-parent-directory-path
# Displays an indicator when completing. # Displays an indicator when completing.
function expand-or-complete-with-indicator { function expand-or-complete-with-indicator {
local indicator local indicator
zstyle -s ':prezto:module:editor' completing 'indicator' zstyle -s ':prezto:module:editor:info:completing' format 'indicator'
print -Pn "$indicator" print -Pn "$indicator"
zle expand-or-complete zle expand-or-complete
zle redisplay zle redisplay

8
modules/prompt/functions/prompt_sorin_setup

@ -46,10 +46,10 @@ function prompt_sorin_setup {
# Add hook for calling git-info before each command. # Add hook for calling git-info before each command.
add-zsh-hook precmd prompt_sorin_precmd add-zsh-hook precmd prompt_sorin_precmd
zstyle ':prezto:module:editor' completing '%B%F{red}...%f%b' zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b'
zstyle ':prezto:module:editor:keymap:primary' overwrite ' %F{red}♺%f' zstyle ':prezto:module:editor:info:keymap:primary' format ' %B%F{red}❯%F{yellow}❯%F{green}❯%f%b'
zstyle ':prezto:module:editor:keymap' primary ' %B%F{red}❯%F{yellow}❯%F{green}❯%f%b' zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format ' %F{red}♺%f'
zstyle ':prezto:module:editor:keymap' alternate ' %B%F{green}❮%F{yellow}❮%F{red}❮%f%b' zstyle ':prezto:module:editor:info:keymap:alternate' format ' %B%F{green}❮%F{yellow}❮%F{red}❮%f%b'
zstyle ':prezto:module:git' action ':%%B%F{yellow}%s%f%%b' zstyle ':prezto:module:git' action ':%%B%F{yellow}%s%f%%b'
zstyle ':prezto:module:git' added ' %%B%F{green}✚%f%%b' zstyle ':prezto:module:git' added ' %%B%F{green}✚%f%%b'
zstyle ':prezto:module:git' ahead ' %%B%F{yellow}⬆%f%%b' zstyle ':prezto:module:git' ahead ' %%B%F{yellow}⬆%f%%b'

Loading…
Cancel
Save