Mercurial > dotfiles.old
comparison zshrc @ 151:87498dbd779a
Move away from oh-my-zsh
author | zegervdv <zegervdv@me.com> |
---|---|
date | Mon, 20 Oct 2014 21:49:21 +0200 |
parents | b3fd48f2df2c |
children | 884d14e94710 |
comparison
equal
deleted
inserted
replaced
150:de8d4246c8fe | 151:87498dbd779a |
---|---|
1 # Path to your oh-my-zsh configuration. | 1 source ~/.zsh/colors.zsh |
2 ZSH=$HOME/.oh-my-zsh | 2 source ~/.zsh/setopt.zsh |
3 source ~/.zsh/exports.zsh | |
4 source ~/.zsh/prompt.zsh | |
5 source ~/.zsh/completion.zsh | |
6 source ~/.zsh/aliases.zsh | |
7 source ~/.zsh/bindkeys.zsh | |
8 source ~/.zsh/history.zsh | |
9 source ~/.zsh/zsh_hooks.zsh | |
3 | 10 |
4 # Set name of the theme to load. | 11 # Plugins |
5 # Look in ~/.oh-my-zsh/themes/ | 12 source ~/.fzf.zsh |
6 # Optionally, if you set this to "random", it'll load a random theme each | 13 source ~/.zsh/zsh-history-substring-search.zsh |
7 # time that oh-my-zsh is loaded. | 14 source ~/.zsh/z.sh |
8 ZSH_THEME="custom" | |
9 setopt correct_all | |
10 | 15 |
11 # Example aliases | 16 precmd() { |
12 # alias zshconfig="mate ~/.zshrc" | 17 if [[ -n "$TMUX" ]]; then |
13 # alias ohmyzsh="mate ~/.oh-my-zsh" | 18 tmux setenv "$(tmux display -p 'TMUX_PWD_#D')" "$PWD" |
14 | |
15 # Set to this to use case-sensitive completion | |
16 # CASE_SENSITIVE="true" | |
17 | |
18 # Comment this out to disable bi-weekly auto-update checks | |
19 # DISABLE_AUTO_UPDATE="true" | |
20 | |
21 # Uncomment to change how many often would you like to wait before auto-updates occur? (in days) | |
22 # export UPDATE_ZSH_DAYS=13 | |
23 | |
24 # Uncomment following line if you want to disable colors in ls | |
25 # DISABLE_LS_COLORS="true" | |
26 | |
27 # Uncomment following line if you want to disable autosetting terminal title. | |
28 # DISABLE_AUTO_TITLE="true" | |
29 | |
30 # Uncomment following line if you want red dots to be displayed while waiting for completion | |
31 COMPLETION_WAITING_DOTS="true" | |
32 | |
33 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | |
34 # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
35 # Example format: plugins=(rails git textmate ruby lighthouse) | |
36 plugins=(git z textmate sublime ruby history-substring-search brew gitfast osx terminalapp vagrant web-search gitignore brew-cask rake-fast colorize colored-man extract) | |
37 | |
38 source $ZSH/oh-my-zsh.sh | |
39 | |
40 # source $ZSH/plugins/history-substring-search/history-substring-search.zsh | |
41 | |
42 setopt nobeep | |
43 setopt notify | |
44 REPORTTIME=5 | |
45 | |
46 # GRML style completion | |
47 # activate color-completion | |
48 zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} | |
49 | |
50 # format on completion | |
51 zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}' | |
52 | |
53 # automatically complete 'cd -<tab>' and 'cd -<ctrl-d>' with menu | |
54 # zstyle ':completion:*:*:cd:*:directory-stack' menu yes select | |
55 | |
56 # insert all expansions for expand completer | |
57 zstyle ':completion:*:expand:*' tag-order all-expansions | |
58 zstyle ':completion:*:history-words' list false | |
59 | |
60 # activate menu | |
61 zstyle ':completion:*:history-words' menu yes | |
62 | |
63 # ignore duplicate entries | |
64 zstyle ':completion:*:history-words' remove-all-dups yes | |
65 zstyle ':completion:*:history-words' stop yes | |
66 | |
67 # match uppercase from lowercase | |
68 zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
69 | |
70 zstyle ':completion:*:matches' group 'yes' | |
71 zstyle ':completion:*' group-name '' | |
72 if [[ "$NOMENU" -eq 0 ]] ; then | |
73 # if there are more than 5 options allow selecting from a menu | |
74 zstyle ':completion:*' menu select=5 | |
75 else | |
76 # don't use any menus at all | |
77 setopt no_auto_menu | |
78 fi | |
79 | |
80 zstyle ':completion:*:messages' format '%d' | |
81 zstyle ':completion:*:options' auto-description '%d' | |
82 | |
83 # describe options in full | |
84 zstyle ':completion:*:options' description 'yes' | |
85 | |
86 # complete manual by their section | |
87 zstyle ':completion:*:manuals' separate-sections true | |
88 zstyle ':completion:*:manuals.*' insert-sections true | |
89 zstyle ':completion:*:man:*' menu yes select | |
90 | |
91 # Search path for sudo completion | |
92 zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \ | |
93 /usr/local/bin \ | |
94 /usr/sbin \ | |
95 /usr/bin \ | |
96 /sbin \ | |
97 /bin \ | |
98 /usr/X11R6/bin | |
99 | |
100 # provide .. as a completion | |
101 zstyle ':completion:*' specal-dirs .. | |
102 | |
103 | |
104 zstyle ':completion::*:(m|)vim:*' ignored-patterns '*.(o|hex|elf|pyc|pdf|out|aux|toc|out|fls|bbl|synctex.gz|dvi|blg|fdb_latexmk)' | |
105 # Customize to your needs... | |
106 export PATH=$PATH:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/usr/local/sbin | |
107 export PATH="/usr/local/bin:$PATH" | |
108 export NODE_PATH="/usr/local/lib/node" | |
109 export PATH="/usr/local/share/npm/bin:$PATH" | |
110 export PATH=$PATH:$HOME/.bin | |
111 eval "$(rbenv init -)" | |
112 | |
113 | |
114 export GNUTERM=X11 | |
115 export SVN_EDITOR=vim | |
116 | |
117 export CLICOLOR=1 | |
118 export LSCOLORS=GxFxCxDxBxegedabagaced | |
119 | |
120 export EDITOR='vim' | |
121 | |
122 export GREP_COLOR=32 | |
123 | |
124 # Shortcuts | |
125 alias blade="cd \"/Volumes/Blade 32GB/\"" | |
126 alias p="~/Documents/projects" | |
127 | |
128 # Commands | |
129 alias grep="grep --color=auto" | |
130 alias beer="bundle exec rake" | |
131 alias ll="ls -altrh" | |
132 alias l="ls -lthr" | |
133 alias gsl="git sl" | |
134 alias gaa='git add --all --intent-to-add' | |
135 | |
136 # Functions | |
137 gcat () { | |
138 cat $1 | egrep "$2|$" | |
139 } | |
140 | |
141 # alias ctags='$(brew --prefix ctags)/bin/ctags' | |
142 | |
143 # Disable Autocorrections | |
144 alias tmux='nocorrect tmux' | |
145 # alias mvim="reattach-to-user-namespace mvim" | |
146 # alias vim="reattach-to-user-namespace vim" | |
147 # alias ag="ag --color" | |
148 alias dot="cd ~/.dotfiles" | |
149 alias ranger="EDITOR=mvim ranger" | |
150 | |
151 # ag tab complete | |
152 _ag() { | |
153 if (( CURRENT == 2 )); then | |
154 compadd $(cut -f 1 .git/tags tmp/tags 2>/dev/null | grep -v '!_TAG') | |
155 fi | 19 fi |
156 } | 20 } |
157 | |
158 compdef _ag ag | |
159 | |
160 compctl -g '~/.teamocil/*(:t:r)' teamocil | |
161 | |
162 [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local | |
163 | |
164 bindkey '\e[A' history-beginning-search-backward | |
165 bindkey '\e[B' history-beginning-search-forward | |
166 | |
167 source ~/.fzf.zsh | |
168 q() { | |
169 if [[ -z "$*" ]]; then | |
170 cd "$(_z -l 2>&1 | sed -n 's/^[ 0-9.,]*//p' | fzf)" | |
171 else | |
172 _z "$@" | |
173 fi | |
174 } | |
175 | |
176 | |
177 PERL_MB_OPT="--install_base \"/Users/zegervdv/perl5\""; export PERL_MB_OPT; | |
178 PERL_MM_OPT="INSTALL_BASE=/Users/zegervdv/perl5"; export PERL_MM_OPT; |