Test out zsh-vi-mode
This commit is contained in:
parent
5ee4981cbf
commit
49ef9da18b
2 changed files with 29 additions and 3 deletions
|
@ -9,7 +9,7 @@ antigen bundle history-substring-search
|
||||||
antigen bundle zsh-users/zsh-completions
|
antigen bundle zsh-users/zsh-completions
|
||||||
antigen bundle zsh-users/zsh-autosuggestions
|
antigen bundle zsh-users/zsh-autosuggestions
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
antigen bundle softmoth/zsh-vim-mode
|
antigen bundle jeffreytse/zsh-vi-mode
|
||||||
|
|
||||||
antigen theme $ADOTDIR/themes dustvoice
|
antigen theme $ADOTDIR/themes dustvoice
|
||||||
|
|
||||||
|
|
30
.zshrc
30
.zshrc
|
@ -49,8 +49,34 @@ if [[ -a $ANTIGEN_ZSH && -a $ANTIGENRC ]]; then
|
||||||
|
|
||||||
antigen init $ANTIGENRC
|
antigen init $ANTIGENRC
|
||||||
|
|
||||||
bindkey -M vicmd '^K' history-substring-search-up
|
function zvm_after_lazy_keybindings() {
|
||||||
bindkey -M vicmd '^J' history-substring-search-down
|
bindkey -M vicmd '^K' history-substring-search-up
|
||||||
|
bindkey -M vicmd '^J' history-substring-search-down
|
||||||
|
}
|
||||||
|
ZVM_NORMAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
|
||||||
|
ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BEAM
|
||||||
|
ZVM_VISUAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
|
||||||
|
ZVM_VISUAL_LINE_MODE_CURSOR=$ZVM_CURSOR_BLOCK
|
||||||
|
ZVM_OPPEND_MODE_CURSOR=$ZVM_CURSOR_BLINKING_UNDERLINE
|
||||||
|
|
||||||
|
ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
|
||||||
|
|
||||||
|
function zvm_after_select_vi_mode() {
|
||||||
|
case $ZVM_MODE in
|
||||||
|
$ZVM_MODE_NORMAL)
|
||||||
|
RPROMPT=$'%{$fg[blue]%}[NORMAL]%{$reset_color%}'
|
||||||
|
;;
|
||||||
|
$ZVM_MODE_INSERT)
|
||||||
|
RPROMPT=$''
|
||||||
|
;;
|
||||||
|
$ZVM_MODE_VISUAL)
|
||||||
|
RPROMPT=$'%{$fg[yellow]%}[VISUAL]%{$reset_color%}'
|
||||||
|
;;
|
||||||
|
$ZVM_MODE_NORMAL)
|
||||||
|
RPROMPT=$'%{$fg[yellow]%}[V-LINE]%{$reset_color%}'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
KEYTIMEOUT=5
|
KEYTIMEOUT=5
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue