From 395889c31164af77a80eef33dc710796b47ab6fa Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Wed, 1 Jun 2022 14:14:34 -0400 Subject: [PATCH] ADD more vim bindings for zsh completion --- dot_config/zsh/dot_zshrc.tmpl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dot_config/zsh/dot_zshrc.tmpl b/dot_config/zsh/dot_zshrc.tmpl index 3088781..c6c11aa 100644 --- a/dot_config/zsh/dot_zshrc.tmpl +++ b/dot_config/zsh/dot_zshrc.tmpl @@ -14,11 +14,16 @@ zmodload zsh/complist autoload -Uz compinit && compinit -i autoload -Uz bashcompinit && bashcompinit -# use menu for selecting completion +# use vi-like menu for selection bindkey -M menuselect 'h' vi-backward-char bindkey -M menuselect 'k' vi-up-line-or-history bindkey -M menuselect 'j' vi-down-line-or-history bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'gg' beginning-of-history +bindkey -M menuselect 'G' end-of-history +bindkey -M menuselect 'gj' vi-forward-blank-word +bindkey -M menuselect 'gk' vi-backward-blank-word +bindkey -M menuselect '^[[Z' reverse-menu-complete zstyle ':completion:*' menu select # add nice colors for descriptions/warnings/messages @@ -33,7 +38,7 @@ zstyle ':completion:*' group-name '' zstyle ':completion:*' file-list all # Highlight the current autocomplete option -zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # ignore full hostnames in ssh config file # the default ssh function does not seem to differentiate b/t