Skip to content

Instantly share code, notes, and snippets.

@gu-fan
Created December 12, 2012 13:33
Show Gist options
  • Save gu-fan/4267744 to your computer and use it in GitHub Desktop.
Save gu-fan/4267744 to your computer and use it in GitHub Desktop.
zshrc
# autoload omz
# zstyle :omz:style theme default
# plugins=(archlinux sprunge git)
# omz init
bindkey -v
ZSH=$HOME/.oh-my-zsh
#~/.oh-my-zsh/themes/rykka.zsh-theme
ZSH_THEME="kolo" # ~/.oh-my-zsh/themes/
# plugins=(git archlinux django github)
source $ZSH/oh-my-zsh.sh
#######################################################################
# Customization by User
#######################################################################
backward-delete-to-slash () {
local WORDCHARS=${WORDCHARS//\//}
zle .backward-delete-word
}
zle -N backward-delete-to-slash
bindkey '^[w' backward-delete-to-slash
# completion in the middle of a line
bindkey '^i' expand-or-complete-prefix
bindkey -v
bindkey '^E' end-of-line
bindkey '^A' beginning-of-line
bindkey "^W" backward-kill-word
bindkey "^H" backward-delete-char
bindkey "^?" backward-delete-char
bindkey "^K" kill-line
bindkey "^U" backward-kill-line
bindkey "^X" vi-cmd-mode
bindkey "^B" history-beginning-search-backward
bindkey "^F" history-beginning-search-forward
bindkey "^N" down-line-or-history
bindkey "^P" up-line-or-history
setopt auto_cd
export EDITOR='gvim'
alias -g cp='cp -i'
alias -g mv='mv -i'
alias -g rm='rm -i'
alias -g ls='ls -F --color=auto'
alias -g ll='ls -l'
alias -g lsg='ls -l | grep --color=auto'
alias -g grep='grep --color=auto'
alias -g psg='ps aux | grep --color=auto'
alias -g ssh1='sh -c ~/Documents/Scripts/sshgfw.sh'
alias -g ssh2='sh -c ~/Documents/Scripts/sshgfw2.sh'
alias -g gae='python2 ~/Documents/net/goagent/local/proxy.py'
alias -g goae='python2 /opt/goagent/local/proxy.py'
alias -g wpx='python2 ~/Documents/net/wallproxy-plus/local/startup.py'
alias -g lsg='ls -a | grep --color=auto'
alias -g gvimr='gvim --remote-tab'
alias -g ee='emacsclient -t'
alias -g mp='./manage.py'
alias -g :e='vim'
alias -g na='nautilus `pwd`'
alias -g vact='source bin/activate'
alias -g vdac='deactivate'
alias -g djm='python manage.py '
alias -g djmr='python manage.py runserver'
alias -g djmsa='python manage.py schemamigration --auto'
alias -g djmsi='python manage.py schemamigration --initial'
alias -g dja='django-admin.py '
alias -g lrc='~/.scripts/lrcdis -m echo >! /tmp/lrc &'
alias -g klrc='pkill lrcdis'
alias -g sshp='ssh -D 8415 [email protected]'
stty -ixon
# Set up auto extension stuff
alias -s html=$BROWSER
# alias -s org=$BROWSER
alias -s php=$BROWSER
alias -s com=$BROWSER
alias -s net=$BROWSER
alias -s png=feh
alias -s jpg=feh
alias -s gif=feg
alias -s sxw=soffice
alias -s doc=soffice
alias -s gz='tar -xzvf'
alias -s bz2='tar -xjvf'
alias -s java=$EDITOR
alias -s txt=$EDITOR
alias -s PKGBUILD=$EDITOR
PATH=$PATH:~/.gem/ruby/1.9.1/bin/
[[ -n $DISPLAY ]] && [[ $TERM != "screen" ]] && [[ -z $TMUX ]] && tmux && exit
# virtualenv wrapper
export WORKON_HOME=~/.virtualenvs
export PROJECT_HOME=~/workspace
PATH="$PATH:/opt/vagrant/bin"
if [[ -x /usr/bin/virtualenvwrapper.sh ]] then
source /usr/bin/virtualenvwrapper.sh
fi
# autojump
[[ -s ~/.autojump/etc/profile.d/autojump.zsh ]] && source ~/.autojump/etc/profile.d/autojump.zsh
# virtualbox usb
VBOX_USB=usbfs
# vim:filetype=zsh foldmethod=marker autoindent expandtab shiftwidth=4
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment