# HG changeset patch # User Meredith Howard # Date 1523504315 14400 # Node ID d61b23bfb6057a0b3f85c3f20d2af8ba400ecf30 # Parent 7520062c1461cbcb655d647bbed1c8a9de488ded try zsh vi mode with an indicator diff --git a/.oh-my-zsh.cust/themes/mhoward.zsh-theme b/.oh-my-zsh.cust/themes/mhoward.zsh-theme --- 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]%}" diff --git a/.zshrc b/.zshrc --- 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