From 993c4187835b004073ce8da9680345b70f4524cd Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Thu, 1 Jun 2017 08:43:36 +0200 Subject: [PATCH] improve vi keybindings in zsh --- zshrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 02e8603..e0503b5 100644 --- a/zshrc +++ b/zshrc @@ -25,6 +25,15 @@ setopt auto_cd setopt multios setopt cdablevars + +######################## +# vi mode +######################## +bindkey -v +zle -N edit-command-line +autoload -Uz edit-command-line +bindkey -M vicmd 'v' edit-command-line + ######################## # Aliases ######################## @@ -53,7 +62,6 @@ alias ls='ls --color=tty' # keybindings -bindkey -v export KEYTIMEOUT=1 # prevent 2*ESC-i insert-mode switch failure