-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshrc
116 lines (85 loc) · 2.99 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
[[ -a ~/.zshrc_before ]] && source ~/.zshrc_before
export ZSH=$HOME/.dotfiles/oh-my-zsh
export EDITOR='vim'
#export PATH=~/Code/mingw-w32/bin:$PATH
#export PATH=~/Code/mingw-w32/mingw/bin/:$PATH
export PATH=/usr/local/share/npm/bin:$PATH
export PATH=$PATH:~/Library/Android/sdk/tools
export PATH=$PATH:~/Library/Android/sdk/platform-tools
#Setup go
export GOPATH=$HOME/.go
# Set to the name theme to load.
# Look in ~/.oh-my-zsh/themes/
# ZSH_THEME="agnoster"
# Set to this to use case-sensitive completion
# export CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# export DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# export DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
DISABLE_AUTO_TITLE="true"
COMPLETION_WAITING_DOTS="true"
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails osx git textmate ruby lighthouse)
plugins=(ruby rails osx bundler git brew npm node bower gem zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# Powerline path setup
export PYTHONPATH=$PYTHONPATH:~/.dotfiles/vim/bundle/powerline
export PATH=$PATH:~/.dotfiles/vim/bundle/powerline/scripts
# Wire in Powerline
powerline-daemon -q
. $HOME/.dotfiles/vim/bundle/powerline/powerline/bindings/zsh/powerline.zsh
# Customize to your needs...
unsetopt auto_name_dirs
function r() {
cd ~/code/$1;
gvim app/controllers/application_controller.rb
guard -c
}
function c() {
cd ~/code/$1;
}
function nct() {
cd ~/code/$1;
$name=${PWD##*/}
tmux new -s $name 'vim .' -d
tmux -t $name new-window -n 'term'
tmux select-window -t $name:1
}
function nrt() {
cd ~/code/$1;
name=${PWD##*/}
tmux new -d -s $name -n 'vim' 'vim .'
tmux new-window -t $name -n 'zeus' 'zsh -c zeus start'
tmux new-window -t $name -n 'console' 'zsh -c zeus rails c'
tmux new-window -t $name -n 'server' 'zsh -c zeus rails s'
tmux new-window -t $name -n 'log' 'zsh -c tail -f log/development.log'
tmux move-window -t $name -r -s 'zeus' -t 'log'
tmux select-window -t 'vim'
tmux attach -t $name
}
compdef '_files -W ~/code -/' c r nct nrt
alias phone_web='adb forward tcp:9222 localabstract:chrome_devtools_remote'
alias nt='tmux new -s ${PWD##*/}'
alias z='zeus'
alias zeus='nocorrect zeus'
#Ruby performance
#export RUBY_GC_MALLOC_LIMIT=60000000
#export RUBY_FREE_MIN=200000
# load rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
#Autojump
[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh
# Direnv
eval "$(direnv hook $0)"
function $$gulp_completion() {
compls=$(grep -Eho "gulp.task[^,]*" gulpfile.* 2>/dev/null | sed s/'"'/"'"/g | cut -d "'" -f 2 | sort)
completions=(${=compls})
compadd -- $completions
}
compdef $$gulp_completion gulp
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
[[ -a ~/.zshrc_after ]] && source ~/.zshrc_after