aboutsummaryrefslogtreecommitdiff
path: root/.config/zsh
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-10-17 21:10:37 +0200
committersrdusr <trevorgray@srdusr.com>2023-10-17 21:10:37 +0200
commitad08964fcbaceaee53d09b7a818909b80d320cbd (patch)
tree020dd6b26762c0a4b35766ff4ca0ef35d1cff4b5 /.config/zsh
parentb25bd6dea7e71c79f17bea7412e3355b9e320fb1 (diff)
downloaddotfiles-ad08964fcbaceaee53d09b7a818909b80d320cbd.tar.gz
dotfiles-ad08964fcbaceaee53d09b7a818909b80d320cbd.zip
Improved speed/lessen resources from compinit etc
Diffstat (limited to '.config/zsh')
-rw-r--r--.config/zsh/.zshrc14
1 files changed, 9 insertions, 5 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index 0da9c85..4713e53 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -15,6 +15,9 @@ else
export KEYTIMEOUT=15
fi
+# Enable various options
+setopt interactive_comments beep extendedglob nomatch notify completeinword prompt_subst
+
########## Vi mode ##########
bindkey -v
bindkey -M viins '^?' backward-delete-char
@@ -47,8 +50,12 @@ zle -N exit_zsh
bindkey '^D' exit_zsh
# Auto-completion
-#autoload -U promptinit && promptinit
-autoload -Uz compinit && compinit
+autoload -Uz compinit
+if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
+ compinit;
+else
+ compinit -C;
+fi;
# Accept completion with <tab> or Ctrl+i and go to next/previous suggestions with Vi like keys: Ctrl+n/p
zmodload -i zsh/complist
@@ -70,9 +77,6 @@ stty stop undef # Disable ctrl-s to freeze terminal.
stty start undef
#unsetopt BEEP
-# Enable various options
-setopt interactive_comments beep extendedglob nomatch notify completeinword prompt_subst
-
########## Prompt(s) ##########
# Enable colors