-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc.oh-my-zsh
118 lines (94 loc) · 3.02 KB
/
zshrc.oh-my-zsh
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
117
118
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="gentoo"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# PATH
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/share/python:/usr/local/share/npm/bin:$PATH
export PATH=$PATH:$HOME/.rvm/bin
# locale
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git virtualenvwrapper colorize python rsync cp extract gnu-utils sudo z)
# virtualenv
export WORKON_HOME=$HOME/.venv
export PROJECT_HOME=$HOME/code/python
export PROJECT_PATHS=$HOME/code/python:$/HOME/code/other
export VIRTUALENV_DISTRIBUTE=true
# golang
[ ! -d $HOME/.go ] && mkdir -p $HOME/.go
export GOPATH=$HOME/.go
export PATH=$PATH:$GOPATH/bin
# local config
if [ -f ~/.zshrc.local ]; then
source ~/.zshrc.local
fi
# https://bugs.python.org/issue35219
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
# aliases
alias v="vim"
alias l="ls"
alias s="ssh"
alias sv="ssh -A -v"
alias svr="ssh -A -v -l root"
alias ccat="colorize"
alias plz="please"
alias myip="curl --silent ifconfig.me"
alias psa="ps aufx"
if [ -f /var/log/syslog ]; then
alias syslog="tail -f /var/log/syslog -n30"
fi
# source oh-my-zsh
source $ZSH/oh-my-zsh.sh
export PS1='%{$fg[red]%}%(?..%?%1v )%{$reset_color%}[%D{%K:%M:%S}] '$PS1
source $HOME/.zshrc.extras
# Keypad
# 0 . Enter
bindkey -s "^[Op" "0"
bindkey -s "^[Ol" "."
bindkey -s "^[OM" "^M"
# 1 2 3
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
bindkey -s "^[Os" "3"
# 4 5 6
bindkey -s "^[Ot" "4"
bindkey -s "^[Ou" "5"
bindkey -s "^[Ov" "6"
# 7 8 9
bindkey -s "^[Ow" "7"
bindkey -s "^[Ox" "8"
bindkey -s "^[Oy" "9"
# + - * /
bindkey -s "^[Ok" "+"
bindkey -s "^[Om" "-"
bindkey -s "^[Oj" "*"
bindkey -s "^[Oo" "/"
bindkey "^[[1;2A" up-line-or-history
bindkey "^[[1;2B" down-line-or-history
bindkey "^[[1;2C" forward-char
bindkey "^[[1;2D" backward-char
bindkey '^[[5C' emacs-forward-word
bindkey '^[[5D' emacs-backward-word
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" || true
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh