diff options
author | Christian Schulze <christian.schulze@gmail.com> | 2015-09-19 06:35:11 +0300 |
---|---|---|
committer | Christian Schulze <christian.schulze@gmail.com> | 2015-09-19 06:35:11 +0300 |
commit | c08a209e20060dda39a1d253eb7585ef4c2b4ac9 (patch) | |
tree | f61637aae56b14272e47a712e01727bf6e3f9d8e /powerlevel9k.zsh-theme | |
parent | bc1b5a4c0b8ca825f7323f88a9e7185771ce3e18 (diff) |
add vi-mode segment
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 5a269f90..73335b60 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -575,6 +575,16 @@ prompt_context() { fi } +# Vi Mode: show editing mode (NORMAL|INSERT) +prompt_vi_mode() { + local mode="${${KEYMAP/vicmd/NORMAL}/(main|viins)/INSERT}" + if [[ "$mode" == "NORMAL" ]]; then + $1_prompt_segment "$0" "$DEFAULT_COLOR" "default" "$mode" + else + $1_prompt_segment "$0" "$DEFAULT_COLOR" "blue" "$mode" + fi +} + # Dir: current working directory prompt_dir() { local current_path='%~' |