diff --git a/init.zsh b/init.zsh index cef9024..3fe81e9 100755 --- a/init.zsh +++ b/init.zsh @@ -14,8 +14,8 @@ fi # Source user configuration [[ -s ${ZDOTDIR:-${HOME}}/.zimrc ]] && source ${ZDOTDIR:-${HOME}}/.zimrc -# If necessary, set vi mode before loading modules -if ${zinput_mode}='vi'; then +# If necessary, set vi mode before loading modules to ensure history search with arrow keys works in vi mode +if [ ${zinput_mode}='vi' ]; then set -o vi else set -o emacs diff --git a/templates/zimrc b/templates/zimrc index ad47dbd..970efda 100644 --- a/templates/zimrc +++ b/templates/zimrc @@ -26,13 +26,6 @@ zmodules=(directory environment git git-info history input utility custom \ # Set your desired prompt here zprompt_theme='steeef' -# -# Input -# - -# Set to vi or emacs -zinput_mode='emacs' - # # Completion # @@ -64,6 +57,9 @@ ztermtitle='%n@%m:%~' # Input # +# Set to vi or emacs +zinput_mode='emacs' + # Uncomment to enable double-dot expansion. # This appends '../' to your input for each '.' you type after an initial '..' #zdouble_dot_expand='true'