Skip to content

Instantly share code, notes, and snippets.

@wangchen
Created January 26, 2014 06:20
Show Gist options
  • Save wangchen/8629273 to your computer and use it in GitHub Desktop.
Save wangchen/8629273 to your computer and use it in GitHub Desktop.
ZSH Configuration
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
DISABLE_CORRECTION="true"
plugins=(git osx brew rake rbenv tmux)
source $ZSH/oh-my-zsh.sh
# vi-mode
bindkey -v
bindkey -a u undo
bindkey -a '^R' redo
bindkey '^?' backward-delete-char
bindkey '^H' backward-delete-char
bindkey -a 'gg' beginning-of-buffer-or-history
bindkey -a G end-of-buffer-or-history
bindkey '^G' what-cursor-position
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^E' edit-command-line
bindkey '^R' history-incremental-search-backward
# For Homebrew
. `brew --prefix`/etc/profile.d/z.sh
export PATH='/usr/local/bin':$PATH
# For Python
export PYTHONSTARTUP=~/.pythonrc
# For OS X 10.9
export LC_ALL=en_US.UTF-8
# For rbenv
eval "$(rbenv init -)"
# Other
export EDITOR='subl'
export PATH=$PATH:/usr/local/mysql/bin
export PATH=$PATH:/Users/wangchen/Hack/android-sdk/build-tools/android-4.3
# Aliases
alias realpath="python -c 'import os,sys; print (os.path.abspath(sys.argv[1]) if len(sys.argv)>1 and os.path.exists(sys.argv[1]) else \"Invalid path\nUsage: realpath <path>\")'"
alias e=$EDITOR
alias svn=colorsvn
alias ber='bundle exec rake'
alias postjson='curl -X POST -H "Content-Type: application/json" -d '
alias rzsh='. ~/.zshrc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment