Permalink
Browse files

Use zplug

  • Loading branch information...
yuku committed May 29, 2017
1 parent 6c9679d commit e87a490a2e73183df4ac079d52d185280799f89b
Showing with 25 additions and 23 deletions.
  1. +0 −9 .gitmodules
  2. +0 −1 modules/zaw
  3. +0 −1 modules/zsh-completions
  4. +0 −1 modules/zsh-syntax-highlighting
  5. +25 −11 zshrc
View
@@ -1,12 +1,3 @@
[submodule "modules/zsh-syntax-highlighting"]
path = modules/zsh-syntax-highlighting
url = git://github.com/zsh-users/zsh-syntax-highlighting.git
[submodule "modules/zsh-completions"]
path = modules/zsh-completions
url = git://github.com/zsh-users/zsh-completions.git
[submodule "modules/zaw"]
path = modules/zaw
url = git://github.com/zsh-users/zaw.git
[submodule "modules/vim-plug"]
path = modules/vim-plug
url = https://github.com/junegunn/vim-plug.git
Submodule zaw deleted from e9d232
Submodule zsh-completions deleted from a185e5
Submodule zsh-syntax-highlighting deleted from 462779
View
36 zshrc
@@ -83,7 +83,6 @@ if (( $+commands[colordiff] )); then
fi
# {{{1 Completion
fpath=($DOTFILES_ROOT/modules/zsh-completions/src $fpath)
autoload -Uz compinit; compinit -u
setopt auto_list # Show all candidates
@@ -215,12 +214,32 @@ fi
autoload history-search-end
zle -N self-insert url-quote-magic # Automatically escape URL string
# {{{1 Zaw
autoload -Uz chpwd_recent_dirs cdr add-zsh-hook # Activate cdr command for zaw-cdr
# {{{1 Plugins
source $ZPLUG_HOME/init.zsh
# Set the priority when loading
# e.g., zsh-syntax-highlighting must be loaded
# after executing compinit command and sourcing other plugins
# (If the defer tag is given 2 or above, run after compinit command)
zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "zsh-users/zsh-completions"
source $DOTFILES_ROOT/modules/zaw/zaw.zsh
source $DOTFILES_ROOT/modules/zaw/sources/git-recent-branches.zsh
source $DOTFILES_ROOT/modules/zaw/sources/git-branches.zsh
zplug "zsh-users/zaw"
# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# Then, source plugins and add commands to $PATH
zplug load
# {{{2 Zaw
autoload -Uz chpwd_recent_dirs cdr add-zsh-hook # Activate cdr command for zaw-cdr
add-zsh-hook chpwd chpwd_recent_dirs
@@ -268,9 +287,4 @@ fi
# {{{2 travis
[ -f $HOME/.travis/travis.sh ] && source $HOME/.travis/travis.sh
# {{{1 zsh-syntax-highlighting
# syntax-highlighting.zsh must be sourced at the end of the .zshrc
source ${DOTFILES_ROOT}/modules/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[ -f ~/.zshrc.local ] && source ~/.zshrc.local

0 comments on commit e87a490

Please sign in to comment.