-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
150 lines (109 loc) · 3.87 KB
/
.zshrc
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
# homebrewを優先
export PATH=~/bin:/usr/local/bin:$HOME/local/lib/ruby:$HOME/.rbenv/bin:$PATH
eval "$(rbenv init -)"
#postgres
export PGDATA=/usr/local/var/postgres
# rvm
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
# rbenv
export PATH="$HOME/.rbenv/versions/2.2.3/bin:$PATH"
eval "$(rbenv init - zsh)"
## 補完機能の強化
autoload -U compinit
compinit
## コアダンプサイズを制限
limit coredumpsize 102400
## 出力の文字列末尾に改行コードが無い場合でも表示
unsetopt promptcr
## 色を使う
#setopt prompt_subst
## ビープを鳴らさない
setopt nobeep
## 内部コマンド jobs の出力をデフォルトで jobs -l にする
setopt long_list_jobs
## 補完候補一覧でファイルの種別をマーク表示
setopt list_types
## サスペンド中のプロセスと同じコマンド名を実行した場合はリジューム
setopt auto_resume
## 補完候補を一覧表示
setopt auto_list
## 直前と同じコマンドをヒストリに追加しない
setopt hist_ignore_dups
## cd 時に自動で push
setopt autopushd
## 同じディレクトリを pushd しない
setopt pushd_ignore_dups
## ファイル名で #, ~, ^ の 3 文字を正規表現として扱う
setopt extended_glob
## TAB で順に補完候補を切り替える
setopt auto_menu
## zsh の開始, 終了時刻をヒストリファイルに書き込む
setopt extended_history
## =command を command のパス名に展開する
setopt equals
## --prefix=/usr などの = 以降も補完
setopt magic_equal_subst
## ヒストリを呼び出してから実行する間に一旦編集
setopt hist_verify
# ファイル名の展開で辞書順ではなく数値的にソート
setopt numeric_glob_sort
## 出力時8ビットを通す
setopt print_eight_bit
## ヒストリを共有
setopt share_history
## 補完候補のカーソル選択を有効に
zstyle ':completion:*:default' menu select=1
## 補完候補の色づけ
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
## ディレクトリ名だけで cd
setopt auto_cd
## カッコの対応などを自動的に補完
setopt auto_param_keys
## ディレクトリ名の補完で末尾の / を自動的に付加し、次の補完に備える
setopt auto_param_slash
## スペルチェック
setopt correct
## Keybind configuration
##
## emacs like keybind (e.x. Ctrl-a goes to head of a line and Ctrl-e goes
## to end of it)
##
bindkey -e
# historical backward/forward search with linehead string binded to ^P/^N
# #
#
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
###シェルに色をつける
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
## Command history configuration
##
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt hist_ignore_dups # ignore duplication command history list
setopt share_history # share command history data
setopt complete_aliases
alias vi='vim'
alias ll='ls -la'
alias news='/Users/ssato/.rvm/rubies/ruby-1.9.3-p392/bin/ruby /Users/ssato/ruby/news.rb'
alias gadd='git add -A'
alias gcim='git commit -m'
alias gpush='git push origin master'
alias gpushh='git push heroku master'
#alias svnversion='/Applications/Xcode\ 2.app/Contents/Developer/usr/bin/svnversion'
#alias svn='/Applications/Xcode\ 2.app/Contents/Developer/usr/bin/svn'
alias clsdmp='/Users/ssato/class-dump'
alias sbopn='open -a /Applications/Sublime\ Text.app/'
alias mdopn='open -a /Applications/Marked\ 2.app/'
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export SVN_EDITOR=vim