From ad08964fcbaceaee53d09b7a818909b80d320cbd Mon Sep 17 00:00:00 2001 From: srdusr Date: Tue, 17 Oct 2023 21:10:37 +0200 Subject: Improved speed/lessen resources from compinit etc --- .config/zsh/.zshrc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to '.config/zsh') 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 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 -- cgit v1.2.3