From 814cc2949601a257d88711ebc7f421dba49ac8ce Mon Sep 17 00:00:00 2001 From: shiludeng Date: Sun, 26 Nov 2017 23:03:14 +0800 Subject: [PATCH] use zsh vi-mode --- .zshrc | 4 ++-- plugins/vi-mode/vi-mode.plugin.zsh | 7 ++++--- themes/re5et.zsh-theme | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.zshrc b/.zshrc index 758f410a4..505085beb 100644 --- a/.zshrc +++ b/.zshrc @@ -7,8 +7,8 @@ export ZSH=$HOME/.oh-my-zsh # time that oh-my-zsh is loaded. #ZSH_THEME="robbyrussell" #ZSH_THEME="random" -ZSH_THEME="azure" -#ZSH_THEME="re5et" +#ZSH_THEME="azure" +ZSH_THEME="re5et" #ZSH_THEME="fox" # Example aliases diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index 82a2f3040..0e0d469ca 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -15,6 +15,7 @@ zle -N edit-command-line bindkey -v + # allow v to edit the command line (standard behaviour) autoload -Uz edit-command-line bindkey -M vicmd 'v' edit-command-line @@ -45,6 +46,6 @@ function vi_mode_prompt_info() { } # define right prompt, if it wasn't defined by a theme -if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then - RPS1='$(vi_mode_prompt_info)' -fi +#if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then + RPS1="$RPS1"'$(vi_mode_prompt_info)'"$RPROMPT" +#fi diff --git a/themes/re5et.zsh-theme b/themes/re5et.zsh-theme index 95af1e2ee..0fdcda921 100644 --- a/themes/re5et.zsh-theme +++ b/themes/re5et.zsh-theme @@ -6,7 +6,7 @@ PROMPT=' %{$fg_bold[cyan]%}%n%{$reset_color%}%{$fg[yellow]%}@%{$reset_color%}%{$fg_bold[blue]%}%m%{$reset_color%}:%{${fg_bold[green]}%}%~%{$reset_color%}$(git_prompt_info) %{${fg[$CARETCOLOR]}%}%# %{${reset_color}%}' -RPS1='${return_code} %D - %*' +RPS1='${return_code} %D - %*'"$RPS1" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[magenta]%}^%{$reset_color%}%{$fg_bold[yellow]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"