Wed, 11 Apr 2018 23:38:35 -0400
try zsh vi mode with an indicator
.oh-my-zsh.cust/themes/mhoward.zsh-theme | file | annotate | diff | comparison | revisions | |
.zshrc | file | annotate | diff | comparison | revisions |
--- a/.oh-my-zsh.cust/themes/mhoward.zsh-theme +++ b/.oh-my-zsh.cust/themes/mhoward.zsh-theme @@ -51,5 +51,8 @@ zstyle ':vcs_info:*:*' formats "%S" "%r/ zstyle ':vcs_info:*:*' nvcsformats "%~" "" # Define prompts. + +MODE_INDICATOR='[N] ' + PROMPT="%(0?.%{$PROMPT_SUCCESS_COLOR%}.%{$PROMPT_FAILURE_COLOR%})${SSH_TTY:+[%n@%m]}%{$FX[bold]%}%$PROMPT_PATH_MAX_LENGTH<..<"'${vcs_info_msg_0_%%.}'"%<<%(!.$PROMPT_ROOT_END.$PROMPT_DEFAULT_END)%{$FX[no-bold]%}%{$FX[reset]%} " -RPROMPT="%{$PROMPT_VCS_INFO_COLOR%}"'${vcs_info_msg_1_:- }'"%{$FX[reset]%}" +RPROMPT='$(vi_mode_prompt_info)'"%{$PROMPT_VCS_INFO_COLOR%}"'${vcs_info_msg_1_:- }'"%{$FX[reset]%}"
--- a/.zshrc +++ b/.zshrc @@ -11,6 +11,7 @@ DISABLE_UNTRACKED_FILES_DIRTY="true" omz_plugins=( plugins/common-aliases plugins/colored-man-pages + plugins/vi-mode ) zsh_plugins=( @@ -34,6 +35,7 @@ if [ -f ~/.zgen/zgen.zsh ]; then fi fi +KEYTIMEOUT=1 REPORTTIME=5 setopt list_packed @@ -44,7 +46,8 @@ setopt interactive_comments export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help" -bindkey '\e\e' kill-whole-line +bindkey '\eOA' up-line-or-beginning-search +bindkey '\eOB' down-line-or-beginning-search source ~/.profile.common