-
Notifications
You must be signed in to change notification settings - Fork 2
/
plugin.zsh
97 lines (81 loc) · 2.86 KB
/
plugin.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
export ZPLUG_HOME=$HOME/.zplug
if [[ ! -d $ZPLUG_HOME ]]; then
git clone https://github.com/zplug/zplug $ZPLUG_HOME
fi
# export ZPLUG_HOME=/usr/local/opt/zplug
source $ZPLUG_HOME/init.zsh
zplug "aws/aws-cli", use:"bin/aws_zsh_completer.sh"
zplug "djui/alias-tips"
# zplug "docker/compose", as:command, use:"contrib/completion/zsh/_docker-compose"
# zplug "docker/docker", as:command, use:"contrib/completion/zsh/_docker"
zplug "modules/directory", from:prezto
zplug "modules/git", from:prezto
zplug "modules/osx", from:prezto
# zplug "peterhurford/git-it-on.zsh"
zplug "plugins/yarn", from:oh-my-zsh
zplug "mollifier/anyframe"
zplug "zsh-users/zsh-autosuggestions", defer:2
zplug "zsh-users/zsh-completions"
zplug "marzocchi/zsh-notify"
zplug "zsh-users/zaw"
# zplug "zsh-users/zsh-history-substring-search", defer:3 # Should be loaded last.
zplug "zsh-users/zsh-syntax-highlighting", defer:3 # Should be loaded 2nd last.
# setopt prompt_subst # Make sure propt is able to be generated properly.
# zplug "adambiggs/zsh-theme", as:theme, use:adambiggs.zsh-theme
# zplug "zsh-users/zsh-syntax-highlighting", defer:2
# zplug "zsh-users/zsh-autosuggestions", use:"dist/autosuggestions.zsh"
# zplug load --verbose
# Check for uninstalled plugins.
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# zplug load
############
# zaw.zsh
#
autoload -Uz chpwd_recent_dirs cdr add-zsh-hook
add-zsh-hook chpwd chpwd_recent_dirs
zstyle ':chpwd:*' recent-dirs-max 5000
zstyle ':chpwd:*' recent-dirs-default yes
zstyle ':completion:*' recent-dirs-insert both
source $ZPLUG_REPOS/zsh-users/zaw/zaw.zsh
zstyle ':filter-select' case-insensitive yes
zstyle ':filter-select' rotate-list yes # enable rotation for filter-select
# zstyle ':filter-select:highlight' matched fg=yellow,standout
# zstyle ':filter-select' max-lines 10 # use 10 lines for filter-select
# zstyle ':filter-select' max-lines -10 # use $LINES - 10 for filter-select
zstyle ':filter-select' extended-search yes # see below
bindkey '^X' zaw-cdr # Ctrl - x
bindkey '^R' zaw-history
bindkey '^O' zaw-open-file
bindkey '^P' zaw-process
bindkey '^S' zaw-ssh-hosts
bindkey '^G^B' zaw-git-branches
bindkey '^G^L' zaw-git-log
bindkey '^G^S' zaw-git-status
# bindkey '^G^F' zaw-git-files
############
# zsh-autosuggestions
source $ZPLUG_REPOS/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh
# use ctrl+t to toggle autosuggestions(hopefully this wont be needed)
# bindkey '^T' autosuggest-toggle
# use ctrl+f to accept a suggested word
# bindkey '^F' autosuggest-accept-suggested-word
bindkey '^F' autosuggest-accept
############
# notify
#
source $ZPLUG_REPOS/marzocchi/zsh-notify/notify.plugin.zsh
############
# zsh syntax
#
source $ZPLUG_REPOS/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
############
# direnv
#
if which direnv > /dev/null; then
eval "$(direnv hook zsh)"
fi