2012-01-25 15:04:37 +08:00
|
|
|
# Source oh-my-zsh if it is installed.
|
|
|
|
if [[ -d $HOME/.oh-my-zsh ]]; then
|
|
|
|
# Path to your oh-my-zsh configuration.
|
|
|
|
ZSH=$HOME/.oh-my-zsh
|
|
|
|
|
|
|
|
# Set name of the theme to load.
|
|
|
|
ZSH_THEME="skwp"
|
|
|
|
|
|
|
|
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
|
|
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
|
|
|
plugins=(git rvm ruby rails autojump)
|
|
|
|
|
|
|
|
# Load default oh-my-zsh stuff
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Don't change. The following determines where YADR is installed.
|
|
|
|
yadr=`find -L ~ -type file -maxdepth 2 -name .yadr | head | sed 's:\.yadr\/::'`
|
|
|
|
|
2011-11-23 09:02:36 +08:00
|
|
|
# Configuration
|
2012-01-25 15:04:37 +08:00
|
|
|
source $yadr/zsh/aliases
|
|
|
|
source $yadr/zsh/zsh_aliases
|
2011-12-07 13:57:45 +08:00
|
|
|
|
2011-11-23 09:02:36 +08:00
|
|
|
# Things I don't want to publish to github
|
2012-02-05 13:10:11 +08:00
|
|
|
[[ -s "$HOME/.secrets" ]] && source "$HOME/.secrets"
|
2011-11-23 09:02:36 +08:00
|
|
|
|
|
|
|
# Vim mode
|
|
|
|
bindkey -v
|
|
|
|
|
|
|
|
# Give me my bash style incremental search
|
|
|
|
bindkey '^R' history-incremental-search-backward
|
|
|
|
|
|
|
|
# Speed up git completion
|
|
|
|
# http://talkings.org/post/5236392664/zsh-and-slow-git-completion
|
2012-01-25 15:04:37 +08:00
|
|
|
__git_files () {
|
|
|
|
_wanted files expl 'local files' _files
|
2011-11-23 09:02:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
# Always pushd when changing directory
|
|
|
|
setopt auto_pushd
|
|
|
|
|
|
|
|
# Fuzzy matching of completions for when you mistype them:
|
|
|
|
zstyle ':completion:*' completer _complete _match _approximate
|
|
|
|
zstyle ':completion:*:match:*' original only
|
|
|
|
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
2011-11-24 11:14:45 +08:00
|
|
|
|
|
|
|
# RVM
|
2012-01-25 15:04:37 +08:00
|
|
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
2011-12-07 13:57:45 +08:00
|
|
|
|
|
|
|
# Add path to our custom bins
|
2012-02-25 05:30:44 +08:00
|
|
|
export PATH=/usr/local/bin:$PATH:$yadr/bin:$yadr/bin/yadr
|
2012-03-06 18:57:33 +08:00
|
|
|
|
|
|
|
# Less Colors for Man Pages
|
|
|
|
# http://linuxtidbits.wordpress.com/2009/03/23/less-colors-for-man-pages/
|
|
|
|
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
|
|
|
|
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
|
|
|
|
export LESS_TERMCAP_me=$'\E[0m' # end mode
|
|
|
|
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
|
|
|
|
export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box
|
|
|
|
export LESS_TERMCAP_ue=$'\E[0m' # end underline
|
|
|
|
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
|