1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-24 20:41:31 +01:00

zsh: add visual mode indicator to zsh theme

This commit is contained in:
bretello 2021-01-15 01:34:10 +01:00
parent 42422738e4
commit d4ec9a5f2e
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
2 changed files with 4 additions and 1 deletions

View File

@ -40,6 +40,7 @@ setopt NO_HIST_VERIFY
# https://www.xkcd.com/378/ # https://www.xkcd.com/378/
export EDITOR="vim" # if antibody_plugins.txt includes robbyrussell/oh-my-zsh path:plugins/vi-mode, this also sets `bindkey -v` export EDITOR="vim" # if antibody_plugins.txt includes robbyrussell/oh-my-zsh path:plugins/vi-mode, this also sets `bindkey -v`
export VI_MODE_RESET_PROMPT_ON_MODE_CHANGE=true # refresh prompt on every mode change
# Fix delete (delete! not backspace) key # Fix delete (delete! not backspace) key
bindkey -a '^[[3~' delete-char bindkey -a '^[[3~' delete-char

View File

@ -124,7 +124,9 @@ function ret_status() {
echo "$ret_status" echo "$ret_status"
} }
_PROMPT_PROTO='$(virtualenv_info)$(user_prompt)$(path_prompt)$(git_prompt)$(job_prompt)$(shlvl_prompt)' export MODE_INDICATOR="%F{255}[%F{9}nav%F{255}]%f"
_PROMPT_PROTO='$(vi_mode_prompt_info)$(virtualenv_info)$(user_prompt)$(path_prompt)$(git_prompt)$(job_prompt)$(shlvl_prompt)'
function prompt_too_long(){ function prompt_too_long(){
local zero='%([BSUbfksu]|([FK]|){*})' local zero='%([BSUbfksu]|([FK]|){*})'