-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
132 lines (101 loc) · 3.37 KB
/
.zshrc
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
typeset -U path cdpath fpath manpath
if [ ! -d $HOME/.zfunctions ]; then
echo "creating $HOME/.zfunctions ..."
mkdir -p $HOME/.zfunctions
fi
fpath=("$HOME/.zfunctions" $fpath)
if [[ ! -d $ZPLUG_HOME ]]; then
git clone https://github.com/zplug/zplug $ZPLUG_HOME
fi
# zplug
source $ZPLUG_HOME/init.zsh
zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
zplug "seebi/dircolors-solarized"
zplug "b4b4r07/enhancd", use:init.sh
zplug "b4b4r07/zsh-vimode-visual"
zplug "spaceship-prompt/spaceship-vi-mode"
zplug "junegunn/fzf", as:command, use:"bin/fzf-tmux"
zplug "junegunn/fzf", use:"shell/*.zsh", as:plugin
zplug "seebi/dircolors-solarized", ignore:"*", as:plugin
zplug "modules/completion", from:prezto
zplug "modules/directory", from:prezto
zplug "modules/history", from:prezto
zplug "modules/autosuggestions", from:prezto
zplug "modules/history-substring-search", from:prezto
zplug "modules/rsync", from:prezto
zplug "modules/archive", from:prezto
case ${OSTYPE} in
linux*)
zplug "modules/pacman", from:prezto
esac
# 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
# autosuggestions
zstyle ':prezto:module:autosuggestions' color 'yes'
zstyle ':prezto:module:autosuggestions:color' found 'fg=136'
zstyle ':prezto:module:history-substring-search' color 'yes'
zstyle ':prezto:module:history-substring-search' case-sensitive 'yes'
zstyle ':notify:*' command-complete-timeout 1
zstyle ':prezto:module:pacman' frontend 'yaourt'
zplug load
source ~/dotfiles/tmux.zsh
ZSH_AUTOSUGGEST_CLEAR_WIDGETS=(do_enter kill-line $ZSH_AUTOSUGGEST_CLEAR_WIDGETS)
source ~/dotfiles/.zshfunc
source ~/dotfiles/.zsh_keybind
source ~/dotfiles/.zsh_aliases
if [ -e $HOME/.zshrc_local ]; then
source $HOME/.zshrc_local
fi
# dircolors
eval `dircolors $ZPLUG_HOME/repos/seebi/dircolors-solarized/dircolors.256dark`
# Customize to your needs...
setopt NO_BEEP
setopt nonomatch
case ${OSTYPE} in
darwin*)
# for brew-file
if [ -f $(brew --prefix)/etc/brew-wrap ];then
source $(brew --prefix)/etc/brew-wrap
fi
alias mc='~/dotfiles/google_chrome'
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
fpath=("/usr/local/share/zsh/site-functions" $fpath)
;;
linux*)
# ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
;;
esac
# [zsh の zmv を使って簡単に複数ファイルを一括リネームする - mollifier delta blog](http://mollifier.hatenablog.com/entry/20101227/p1)
autoload -Uz zmv
alias zmv='noglob zmv -W'
if (which zprof > /dev/null) ;then
zprof | less
fi
# rust
alias rust='cargo-script'
eval "$(direnv hook zsh)"
# OPAM configuration
. /home/yuya373/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
if (which nodenv > /dev/null) ;then
eval "$(nodenv init -)"
fi
if [ -e ${HOME}/.rbenv/bin ]; then
export PATH="$HOME/.rbenv/bin:$PATH"
fi
if (which rbenv > /dev/null) ;then
eval "$(rbenv init -)"
fi
# Fix zsh: command not found: tmuximum
unalias t
if (which anyenv > /dev/null) ;then
eval "$(anyenv init -)"
fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh