-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.zshrc
63 lines (50 loc) · 1.81 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
export KEYTIMEOUT=1
export EDITOR='vim'
export LESS='-RFX'
export PAGER='less'
export JAVA_HOME='/Library/Java/Home'
export GREP_OPTIONS='--color=auto --exclude-dir=.git'
export GREP_COLOR='0;32'
export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc"
export GOPATH=$HOME/go
shdir=~/.zsh
configs=(
options.zsh
aliases.zsh
../.localrc
)
for f in $configs; do
[[ -f $shdir/$f ]] && . $shdir/$f
done
zstyle ':completion:*:cd:*' ignore-parents parent pwd # cd will never select the parent directory (e.g.: cd ../<TAB>)
zstyle ':completion:*' completer _expand _complete
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
fi
fpath=(/opt/homebrew/share/zsh/site-functions /usr/local/share/zsh/site-functions $fpath)
autoload -Uz compaudit compinit && compinit
autoload -Uz colors && colors
eval `dircolors ~/.dir_colors`
fpath=(~/.zsh/functions $fpath)
autoload -U ~/.zsh/functions/*(:t)
source ~/.zsh/functions/_git_prompt
export PS1='%{$fg[magenta]%}%m%{$fg[white]%}:%{$fg[cyan]%}%1~%{$fg[white]%}`git-prompt`%{$fg[white]%}%# '
function zle-keymap-select() {
zle reset-prompt
zle -R
}
zle -N zle-keymap-select
function vi_mode_prompt_info() {
echo "${${KEYMAP/vicmd/[% NORMAL]%}/(main|viins)/}"
}
# define right prompt, regardless of whether the theme defined it
RPS1='$(vi_mode_prompt_info)'
RPS2=$RPS1
eval "$(rbenv init - --no-rehash)"
export NVM_DIR="$HOME/.nvm"
export PATH="$NVM_DIR/versions/node/v$(<$NVM_DIR/alias/default)/bin:$PATH" # make some node binary available w/o loading slow nvm
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" --no-use # Homebrew's old nvm install path
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # Homebrew's newer nvm install path
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^x^x' edit-command-line