From 2562a50f89e538e41cd6b9153b5c6ae2ee00d2f4 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Mon, 30 Jul 2018 09:28:27 +0100 Subject: [PATCH] zsh: use vim mode --- .config/zsh/.zshrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index e52554a..678f5a0 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -49,16 +49,18 @@ fi source "$antigen_src" antigen bundle zsh-users/zsh-completions -antigen bundle zsh-users/zsh-autosuggestions +antigen bundle toadjaune/zsh-autosuggestions@compatibility-syntax-hl antigen bundle Tarrasch/zsh-syntax-highlighting antigen bundle zsh-users/zsh-history-substring-search antigen bundle mafredri/zsh-async antigen apply +# Vim mode! +bindkey -v +export KEYTIMEOUT=25 # Set some key-binds -bindkey -e bindkey "^[[1;3C" forward-word bindkey "^[[1;5C" forward-word bindkey "^[[1;3D" backward-word @@ -80,6 +82,9 @@ bindkey '^[[B' fzf-history-widget # Down (fzf) bindkey '^[[1;3A' history-substring-search-up # Alt+Up (hsh) bindkey '^[[1;3B' history-substring-search-down # Alt+Down (hsh) +autoload -z edit-command-line +zle -N edit-command-line +bindkey -M vicmd v edit-command-line ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}") ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(history-substring-search-up history-substring-search-down)