mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
use zsh vi-mode
This commit is contained in:
parent
c66ee17918
commit
814cc29496
3 changed files with 7 additions and 6 deletions
4
.zshrc
4
.zshrc
|
|
@ -7,8 +7,8 @@ export ZSH=$HOME/.oh-my-zsh
|
||||||
# time that oh-my-zsh is loaded.
|
# time that oh-my-zsh is loaded.
|
||||||
#ZSH_THEME="robbyrussell"
|
#ZSH_THEME="robbyrussell"
|
||||||
#ZSH_THEME="random"
|
#ZSH_THEME="random"
|
||||||
ZSH_THEME="azure"
|
#ZSH_THEME="azure"
|
||||||
#ZSH_THEME="re5et"
|
ZSH_THEME="re5et"
|
||||||
#ZSH_THEME="fox"
|
#ZSH_THEME="fox"
|
||||||
|
|
||||||
# Example aliases
|
# Example aliases
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ zle -N edit-command-line
|
||||||
|
|
||||||
bindkey -v
|
bindkey -v
|
||||||
|
|
||||||
|
|
||||||
# allow v to edit the command line (standard behaviour)
|
# allow v to edit the command line (standard behaviour)
|
||||||
autoload -Uz edit-command-line
|
autoload -Uz edit-command-line
|
||||||
bindkey -M vicmd 'v' 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
|
# define right prompt, if it wasn't defined by a theme
|
||||||
if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then
|
#if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then
|
||||||
RPS1='$(vi_mode_prompt_info)'
|
RPS1="$RPS1"'$(vi_mode_prompt_info)'"$RPROMPT"
|
||||||
fi
|
#fi
|
||||||
|
|
|
||||||
|
|
@ -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_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}%}'
|
%{${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_PREFIX="%{$fg_bold[magenta]%}^%{$reset_color%}%{$fg_bold[yellow]%}"
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue