summaryrefslogtreecommitdiff
path: root/zscripts/zshcompmenu.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zscripts/zshcompmenu.zsh')
-rwxr-xr-xzscripts/zshcompmenu.zsh18
1 files changed, 18 insertions, 0 deletions
diff --git a/zscripts/zshcompmenu.zsh b/zscripts/zshcompmenu.zsh
new file mode 100755
index 0000000..0d471a5
--- /dev/null
+++ b/zscripts/zshcompmenu.zsh
@@ -0,0 +1,18 @@
+#!/usr/bin/env zsh
+
+# Basic auto/tab complete
+autoload -U compinit
+zstyle ':completion:*' menu select
+zmodload zsh/complist
+compinit -d "${XDG_CACHE_HOME:-$HOME/.config}/zcompdump" # Change where .zcompdump is stored
+_comp_options+=(globdots) # Include hidden files.
+
+# Use ctrl-vi keys in tab complete menu
+bindkey -M menuselect '^h' vi-backward-char
+bindkey -M menuselect '^j' vi-down-line-or-history
+bindkey -M menuselect '^k' vi-up-line-or-history
+bindkey -M menuselect '^l' vi-forward-char
+bindkey -v '^?' backward-delete-char
+
+# Options
+setopt MENU_COMPLETE # Immediately insert first option from completion menu