This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
208 lines (165 loc) · 4.91 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# Fantasque Powerline font repo
# https://github.com/ztomer/fantasque_awesome_powerline
#
export TERM="xterm-256color"
. ~/.bashrc
# PATH {{{
# If you come from bash you might have to change your $PATH.
export PATH=/usr/local/bin:$HOME/bin:$PATH
# }}}
# {{{ SETOPS
# type .. instead of cd..
setopt auto_cd
# }}}
# THEME {{{
ZSH_THEME="bullet-train"
# }}}
# Antigen for plugin management
# https://github.com/zsh-users/antigen
#
source /usr/local/Cellar/antigen/2.2.3/share/antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle rails
antigen bundle ruby
antigen bundle tmux
antigen bundle vi-mode
antigen bundle colored-man-pages
antigen bundle tmuxinator
antigen bundle fabiokiatkowski/exercism.plugin.zsh
antigen bundle gusaiani/elixir-oh-my-zsh
antigen bundle sroze/docker-compose-zsh-plugin
antigen bundle michaelxmcbride/zsh-dircycle
antigen bundle veelenga/crystal-zsh
antigen bundle MisterRios/stashy
# antigen bundle paraqles/zsh-plugin-rails
antigen bundle joow/macos
antigen bundle yarn
antigen bundle alias-tips
antigen bundle zsh-autosuggestions
antigen theme https://github.com/caiogondim/bullet-train-oh-my-zsh-theme bullet-train
# antigen theme bhilburn/powerlevel9k powerlevel9k
antigen bundle zsh-users/zsh-syntax-highlighting
antigen apply
source ~/.k/k.sh
source ~/.oh-my-zsh/plugins/alias-tips/alias-tips.plugin.zsh
BULLETTRAIN_PROMPT_ORDER=(
time
status
dir
ruby
nvm
elixir
git
cmd_exec_time
)
SEGMENT_SEPARATOR='\uE0B4'
BULLETTRAIN_PROMPT_CHAR='⑆'
# zsh autosuggestions
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=fg=3
# }}}
# {{{ COMPLETION
if [[ "$CASE_SENSITIVE" = true ]]; then
zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*'
else
if [[ "$HYPHEN_INSENSITIVE" = true ]]; then
zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*'
else
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
fi
fi
unset CASE_SENSITIVE HYPHEN_INSENSITIVE
zstyle ':completion:*' list-colors ''
# exercism.io completion
if [ -f ~/.config/exercism/exercism_completion.zsh ]; then
. ~/.config/exercism/exercism_completion.zsh
fi
# }}}
# EXPORTS {{{
export EDITOR="nvim"
export SSH_KEY_PATH="~/.ssh/rsa_id"
export COMPASS_HOME=/Users/aji/dev/_ul/compass
export PATH=$PATH:/Users/aji/dev/_ul/compass/bin
# }}}
# ALIASES {{{
# CONFIG ETC {{{
# flush DNS
alias flushdns="dscacheutil -flushcache && killall -HUP mDNSResponder"
# alias reminders plugin
alias zshconfig="nvim ~/.zshrc"
alias vimconfig="nvim ~/.config/nvim/init.vim"
alias v="nvim ."
alias nv="nvim"
alias el="nvim -c L"
alias l="k -a"
alias c="cd"
alias ..="cd .."
alias be="bundle exec"
alias rserv="ruby -run -e httpd -- -p 5000 ."
alias ya="yarn add --DEV"
alias yi="yarn install"
alias ys="yarn start"
alias yt="yarn test"
alias npmi="npm install"
alias npms="npm start"
alias wp="webpack"
alias dc="docker-compose"
alias dcup="docker-compose up -d"
alias dcr="docker-compose run --rm"
alias dcx="docker-compose stop && docker-compose rm --force"
alias rr="~/.ranger/ranger.py ."
# }}}
# TMUX {{{
alias td="tmux detach"
alias tas="tmux attach-session -t"
alias tns="tmux new-session"
# }}}
# GIT {{{
alias gs="git status"
alias ga="git add"
alias cob="git checkout -b"
alias co="git checkout"
alias gcm="git commit -m"
alias gpo="git push origin"
alias glo="git pull origin"
alias glom="git pull origin master"
alias gfo="git fetch origin"
alias m!="git checkout master"
alias gsquash="git fetch; git reset --mixed origin/master; git merger --squash HEAD@{1}"
# }}}
# PROJECTS {{{
alias notes="nvim ~/Dropbox"
alias _="cd ~/dev/_ul"
alias dev="cd ~/dev"
alias ulgo="tmuxinator start ulgo"
alias compass="tmuxinator start compass"
alias autocert="tmuxinator start autocert"
alias tc="NODE_PATH=./src mocha --compilers js:babel-core/register --require tools/testSetup.js --reporter spec"
# alarmHUB {{{
alias da:b="docker container attach compass_backend_wrapper_1"
alias da:ac="docker container attach compass_alarm_company_service_1"
# Compass Home working directory installed to path
export COMPASS_HOME=/Users/aji/dev/_ul/compass
export PATH=$PATH:/Users/aji/dev/_ul/compass/bin
alias cyolo="ruby ~/dev/_ul/compass/setup_script.rb --all"
#}}}
# }}}
# MISC {{{
alias s="rails s"
bindkey '^i' expand-or-complete-prefix
alias keys="ssh-add -K ~/.ssh/id_rsa && ssh-add -K ~/.ssh/rsa_ul"
alias rs="RUBYOPT='-W0' rails spec"
alias docker-cleanup="docker rmi $(docker images | grep "<none>" | awk {'print $3'})"
alias jarvis="ssh [email protected]"
alias mg="marker get" # terminal command palette
# }}}
# }}}
# Applications {{{
. ~/.z.sh
[[ -s "$HOME/.local/share/marker/marker.sh" ]] && source "$HOME/.local/share/marker/marker.sh"
# }}}
export PATH="$PATH:$HOME/Dropbox/notes"
export PATH="$PATH:$DOTFILES_DIR/bin/"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"