mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 13:30:07 +00:00
Don't show segment if POWERLEVEL9K_VI_INSERT_MODE_STRING == ''
This commit is contained in:
parent
c69d21016c
commit
162caba19c
2 changed files with 3 additions and 0 deletions
|
@ -621,6 +621,8 @@ you are using the [ZSH Line Editor](http://zsh.sourceforge.net/Doc/Release/Zsh-L
|
||||||
|`POWERLEVEL9K_VI_INSERT_MODE_STRING`|`"INSERT"`|String to display while in 'Insert' mode.|
|
|`POWERLEVEL9K_VI_INSERT_MODE_STRING`|`"INSERT"`|String to display while in 'Insert' mode.|
|
||||||
|`POWERLEVEL9K_VI_COMMAND_MODE_STRING`|`"NORMAL"`|String to display while in 'Command' mode.|
|
|`POWERLEVEL9K_VI_COMMAND_MODE_STRING`|`"NORMAL"`|String to display while in 'Command' mode.|
|
||||||
|
|
||||||
|
To hide the segment entirely when in `INSERT` mode, set `POWERLEVEL9K_VI_INSERT_MODE_STRING=''`
|
||||||
|
|
||||||
#### Unit Test Ratios
|
#### Unit Test Ratios
|
||||||
|
|
||||||
The `symfony2_tests` and `rspec_stats` segments both show a ratio of "real"
|
The `symfony2_tests` and `rspec_stats` segments both show a ratio of "real"
|
||||||
|
|
|
@ -1366,6 +1366,7 @@ prompt_vi_mode() {
|
||||||
"$1_prompt_segment" "$0_NORMAL" "$2" "$DEFAULT_COLOR" "default" "$POWERLEVEL9K_VI_COMMAND_MODE_STRING"
|
"$1_prompt_segment" "$0_NORMAL" "$2" "$DEFAULT_COLOR" "default" "$POWERLEVEL9K_VI_COMMAND_MODE_STRING"
|
||||||
;;
|
;;
|
||||||
main|viins|*)
|
main|viins|*)
|
||||||
|
if [[ -z $POWERLEVEL9K_VI_INSERT_MODE_STRING ]]; then return; fi
|
||||||
"$1_prompt_segment" "$0_INSERT" "$2" "$DEFAULT_COLOR" "blue" "$POWERLEVEL9K_VI_INSERT_MODE_STRING"
|
"$1_prompt_segment" "$0_INSERT" "$2" "$DEFAULT_COLOR" "blue" "$POWERLEVEL9K_VI_INSERT_MODE_STRING"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue