From e8ec19ae9b6b44d96c517c0015b2f98405461fa7 Mon Sep 17 00:00:00 2001 From: Felix Tenley Date: Sun, 15 Mar 2020 14:46:51 +0100 Subject: [PATCH] feat(zsh): add more vi bindings for menuselect --- home/shell/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/home/shell/default.nix b/home/shell/default.nix index f9c4755..a1d0c7a 100644 --- a/home/shell/default.nix +++ b/home/shell/default.nix @@ -41,13 +41,19 @@ in file = "share/zsh-history-substring-search/zsh-history-substring-search.zsh"; } ]; - initExtra = '' + initExtra = with pkgs; '' + export KEYTIMEOUT=1 + zmodload zsh/complist zstyle ':completion:*' menu select zstyle ':completion:*' insert-tab false bindkey '^I' first-tab-completion bindkey -M menuselect '\e' send-break - bindkey -M menuselect '^[[Z' reverse-menu-complete + bindkey -M menuselect "$terminfo[kcbt]" reverse-menu-complete + bindkey -M menuselect 'h' vi-backward-char + bindkey -M menuselect 'k' vi-up-line-or-history + bindkey -M menuselect 'l' vi-forward-char + bindkey -M menuselect 'j' vi-down-line-or-history setopt histignoredups bindkey '^[[A' history-substring-search-up