From 983aaefa5ca56c4f09ffc7777d173d996850eb01 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Tue, 14 Mar 2023 12:56:49 +0100 Subject: [PATCH] speed up zsh --- zsh/.config/zsh/.zshrc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index c16b9ad..0b4e014 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -35,10 +35,17 @@ zinit light-mode for \ ### End of Zinit's installer chunk - -# compinit must be ran before fzf-tab, but fzf-tab must be before syntax highlighting etc +# some magic to run compinit stuff only once a day, which should speed up zsh startup a good bit autoload -Uz compinit -compinit +for dump in $ZSHDOTDIR/.zcompdump(N.mh+24); do + compinit +done +compinit -C + +# this would be the regular version of the above compinit code: +# compinit must be ran before fzf-tab, but fzf-tab must be before syntax highlighting etc +#autoload -Uz compinit +#compinit zinit light "Aloxaf/fzf-tab"