public
Description: kenchan's dotfiles.
Homepage:
Clone URL: git://github.com/kenchan/dotfiles.git
dotfiles / dot.zshrc
100644 70 lines (56 sloc) 1.327 kb
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
if [ ~/.profile ]; then
  source ~/.profile
fi
 
# PROMPT
PROMPT="%m%% "
SPROMPT="correct: %R -> %r ? "
 
autoload -Uz vcs_info
zstyle ':vcs_info:*' formats '(%b)'
zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a]'
precmd() {
  psvar=()
  vcs_info
  [[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_"
}
RPROMPT="%1(v|%F{green}%1v%f[%~]|[%~])"
 
# history
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
setopt hist_ignore_dups
setopt share_history
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
 
# complement
autoload -U compinit; compinit
setopt list_packed
 
# Ctrl-D
set IGNORE_EOF
 
# aliases
alias ls='ls -F --color=auto'
alias ll='ls -alh --color=auto'
alias la='ls -a --color=auto'
alias vi='vim'
alias apt='sudo aptitude'
alias g='git'
 
#rubygems
export PATH=$HOME/.gem/ruby/1.8/bin:$PATH
 
setopt auto_cd
setopt auto_pushd
setopt correct
setopt extended_history
setopt share_history
 
# EDITOR
export EDITOR=vi
bindkey -e
 
# For Git
case "${OSTYPE}" in
  linux*)
  export GIT_PAGER="less -RE"
  ;;
esac
 
function chpwd() { ls }
 
 
if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi