From 585925df388abaf6265ac3c8855c92dfbc5bf3cf Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 30 Aug 2018 22:44:22 +0100 Subject: [PATCH] Fix vi-mode grips Tips from [zsh-vimto](https://github.com/laurenkt/zsh-vimto). * Remove delay when changing mode * Enable backspace when returning to viins from vicmd mode --- zshenv | 3 +++ zshrc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/zshenv b/zshenv index e226332..6bcca71 100644 --- a/zshenv +++ b/zshenv @@ -8,6 +8,9 @@ HISTFILE=$HOME/.cache/zsh/histfile HISTSIZE=20000 SAVEHIST=20000 +# Remove vi mode switch delay +KEYTIMEOUT=1 + # Enable time stats for long lasting commands REPORTTIME=5 diff --git a/zshrc b/zshrc index c82543d..353304c 100644 --- a/zshrc +++ b/zshrc @@ -86,6 +86,9 @@ prompt fresh # Enable vi mode line editor keymap bindkey -v +# Enable backspace after returning to viins from vicmd mode +bindkey '^?' backward-delete-char + # Enable yank, change, and delete whole line with 'Y', 'cc', and 'dd' bindkey -M vicmd 'Y' vi-yank-whole-line