commit c2f91eff3bccc5d068deb64011ac829df92da5b7
parent 358bb76dd287fee5b3ff7eabaa2820eaabfc5e69
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 11 Mar 2019 09:10:32 +0100
Use zgen instead of zplug for speed reasons
Diffstat:
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/init/50_zsh.sh b/init/50_zsh.sh
@@ -2,8 +2,8 @@
# zsh plugin manager
(mkdir -p ~/code && cd ~/code &&
- if [ ! -d zplug ]; then
- git clone https://github.com/zplug/zplug
+ if [ ! -d zgen ]; then
+ git clone https://github.com/tarjoilija/zgen
fi
)
diff --git a/links/.zshrc b/links/.zshrc
@@ -32,6 +32,9 @@ zstyle :chpwd:* recent-dirs-pushd true
zle -N edit-command-line
zle -N select-bracketed
zle -N select-quoted
+zle -N fzf-history-widget
+zle -N history-substring-search-up
+zle -N history-substring-search-down
HISTFILE=~/.zhistory
HISTSIZE=$((2 ** 16))
@@ -194,19 +197,20 @@ zle -N zle-keymap-select
#### PLUGINS
-# export ZPLUG_HOME=~/code/zplug
-# source $ZPLUG_HOME/init.zsh
-#
-# zplug junegunn/fzf, use:shell/*.zsh
-# zplug zsh-users/zsh-autosuggestions
-# zplug zsh-users/zsh-completions, lazy:true
-# zplug zsh-users/zsh-syntax-highlighting
-# zplug zsh-users/zsh-history-substring-search
-#
-# if ! zplug check; then
-# zplug install
-# fi
-# zplug load
+source "${HOME}/code/zgen/zgen.zsh"
+# if the init script doesn't exist
+if ! zgen saved; then
+
+ # specify plugins here
+ zgen load https://github.com/junegunn/fzf
+ zgen load https://github.com/zsh-users/zsh-autosuggestions
+ zgen load https://github.com/zsh-users/zsh-completions
+ zgen load https://github.com/zsh-users/zsh-syntax-highlighting
+ zgen load https://github.com/zsh-users/zsh-history-substring-search
+
+ # generate the init script from plugins above
+ zgen save
+fi
#### EXTRA COMMANDS