From acdb1d4bc79820bb015d102d95f8185d60e9ac11 Mon Sep 17 00:00:00 2001 From: Anton Shiryaev Date: Fri, 6 Apr 2018 01:50:55 +0300 Subject: [PATCH] Add .zimrc option 'zinput_mode' Closes #261 --- init.zsh | 7 +++++++ templates/zimrc | 3 +++ 2 files changed, 10 insertions(+) diff --git a/init.zsh b/init.zsh index 73afd2c..9e7efc9 100755 --- a/init.zsh +++ b/init.zsh @@ -13,6 +13,13 @@ fi # Source user configuration [[ -s ${ZDOTDIR:-${HOME}}/.zimrc ]] && source ${ZDOTDIR:-${HOME}}/.zimrc +# Set input mode before loading modules +if [ ${zinput_mode}='vi' ]; then + set -o vi +else + set -o emacs +fi + # Autoload module functions () { local mod_function diff --git a/templates/zimrc b/templates/zimrc index 203a7a6..8f10075 100644 --- a/templates/zimrc +++ b/templates/zimrc @@ -57,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'