diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2015-09-20 02:30:37 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2015-09-20 02:30:37 +0300 |
commit | 6deb3fe0946bbe7a7ae76b8e3357bdf536f84027 (patch) | |
tree | 09e1449db9ef6578a41d6c08ea44cdbb53d42649 /powerlevel9k.zsh-theme | |
parent | bba9fb79934615411ee95b8374a2d5b11a75fb66 (diff) | |
parent | 665ed59e6a52af358548539b3e2aacd9e1daa120 (diff) |
Merge pull request #98 from christian-schulze/vi-mode-segment
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 a60fd12d..86fc2c42 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -576,6 +576,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_NORMAL" "$DEFAULT_COLOR" "default" "$mode" + else + $1_prompt_segment "$0_INSERT" "$DEFAULT_COLOR" "blue" "$mode" + fi +} + # Dir: current working directory prompt_dir() { local current_path='%~' |