From d2305383ab01444cb81dca136fe82d1a28017dc8 Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Sat, 10 Feb 2018 15:59:28 +0100 Subject: [PATCH] Enable vim bindings in zsh --- zsh/custom.zsh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/zsh/custom.zsh b/zsh/custom.zsh index e2be05a..b12a4a3 100644 --- a/zsh/custom.zsh +++ b/zsh/custom.zsh @@ -1,3 +1,22 @@ +# vim bindings +bindkey -v +export KEYTIMEOUT=1 + +# Use vim cli mode +bindkey '^P' up-history +bindkey '^N' down-history + +# backspace and ^h working even after +# returning from command mode +bindkey '^?' backward-delete-char +bindkey '^h' backward-delete-char + +# ctrl-w removed word backwards +bindkey '^w' backward-kill-word + +# ctrl-r starts searching history backward +bindkey '^r' history-incremental-search-backward + if [ "light" = "$THEME_SWITCHER" ]; then ZSH_THEME="sunrise" else