From 372eec7381bec34a48c2139b350e3339a1dd6a89 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Sun, 27 Sep 2015 23:18:54 +0200 Subject: [PATCH] fix vi mode escape issue in zsh --- vimrc | 3 --- zshrc | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/vimrc b/vimrc index a2a00b1..5cf5209 100644 --- a/vimrc +++ b/vimrc @@ -208,9 +208,6 @@ nmap r :%s#\<=expand("")\># "" strip all trailing whitespace in the current file nnoremap W :%s/\s\+$//e:let @/='' -"" insert path of current file into a command -cmap =expand("%:p:h") . "/" - "" fast editing of the .vimrc nmap ev :e $MYVIMRC nmap sv :so $MYVIMRC diff --git a/zshrc b/zshrc index 9718714..5e6d84b 100644 --- a/zshrc +++ b/zshrc @@ -47,6 +47,13 @@ alias ls='ls --color=tty' # keybindings bindkey -v +export KEYTIMEOUT=1 + +# prevent 2*ESC-i insert-mode switch failure +noop () { } +zle -N noop +bindkey -M vicmd '\e' noop + bindkey '^P' up-history bindkey '^N' down-history