From 6fa513850cb2f064febf90c75ab6400a5cbae791 Mon Sep 17 00:00:00 2001 From: bretello Date: Mon, 7 Feb 2022 20:49:58 +0100 Subject: [PATCH] zsh: add editing mode setup check --- brethil_dotfile.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index f4693a7..cdbf22c 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -58,6 +58,10 @@ bindkey -a '^[[3~' delete-char export KEYTIMEOUT=50 # reduce the transition time between vim modes to 0.1s # bindkey -M vicmd 'V' edit-command-line # this remaps `vv` to `V` (but overrides `visual-mode`) # add this if the keytimeout is too slow +if ! grep -q "set editing-mode vi" $HOME/.inputrc &> /dev/null; then + echo "set editing-mode vi" >> ~/.inputrc && echo "Warning: set up editing-mode ~/.inputrc" +fi + export HISTSIZE=10000000