mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-18 05:40:07 +00:00
Merge pull request #117 from dritter/vi_customizations
Make the vi_mode segement more customizable.
This commit is contained in:
commit
34add8aedf
2 changed files with 10 additions and 2 deletions
|
@ -233,6 +233,12 @@ VI-Mode, you need to configure it separately in your `~/.zshrc`:
|
||||||
# make it more responsive
|
# make it more responsive
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
|
If you want to display another string than "NORMAL" or "INSERT" in command or
|
||||||
|
insert-mode, you can do that by setting environment variables like:
|
||||||
|
|
||||||
|
POWERLEVEL9K_VI_INSERT_MODE_STRING="INS"
|
||||||
|
POWERLEVEL9K_VI_COMMAND_MODE_STRING="CMD"
|
||||||
|
|
||||||
#### 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"
|
||||||
|
|
|
@ -871,13 +871,15 @@ prompt_todo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Vi Mode: show editing mode (NORMAL|INSERT)
|
# Vi Mode: show editing mode (NORMAL|INSERT)
|
||||||
|
set_default POWERLEVEL9K_VI_INSERT_MODE_STRING "INSERT"
|
||||||
|
set_default POWERLEVEL9K_VI_COMMAND_MODE_STRING "NORMAL"
|
||||||
prompt_vi_mode() {
|
prompt_vi_mode() {
|
||||||
case ${KEYMAP} in
|
case ${KEYMAP} in
|
||||||
main|viins)
|
main|viins)
|
||||||
"$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "INSERT"
|
"$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "$POWERLEVEL9K_VI_INSERT_MODE_STRING"
|
||||||
;;
|
;;
|
||||||
vicmd)
|
vicmd)
|
||||||
"$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "NORMAL"
|
"$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "$POWERLEVEL9K_VI_COMMAND_MODE_STRING"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue