-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
78 lines (58 loc) · 1.76 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
setopt HIST_IGNORE_ALL_DUPS
WORDCHARS=${WORDCHARS//[\/]}
ZSH_AUTOSUGGEST_MANUAL_REBIND=1
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
# Download zimfw plugin manager if missing.
if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
if (( ${+commands[curl]} )); then
curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
else
mkdir -p ${ZIM_HOME} && wget -nv -O ${ZIM_HOME}/zimfw.zsh \
https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
fi
fi
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
source ${ZIM_HOME}/zimfw.zsh init -q
fi
# Initialize modules.
source ${ZIM_HOME}/init.zsh
export LANG=ja_JP.UTF-8
bindkey -e
setopt complete_in_word
autoload -Uz colors
colors
setopt correct
HISTFILE=$HOME/.zhistory
HISTSIZE=10000
SAVEHIST=50000
setopt hist_ignore_dups
setopt hist_expand
setopt share_history
alias repo='cd $(repos)'
alias repos="ghq list -p | fzf"
alias vz="vim ~/.zshrc"
alias nz="nvim ~/.zshrc"
alias sz="source ~/.zshrc"
alias vv="vim ~/.vimrc"
alias nn="nvim ~/.config/nvim"
# export PATH="/usr/local/bin/vim:$PATH"
export XDG_CONFIG_HOME=~/.config
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
if [[ "${+commands[go]}" == 1 ]] ;then
export GOPATH=$(go env GOPATH)
export GOBIN=$(go env GOPATH)/bin
export PATH=$GOPATH/bin:$PATH
fi
export EDITOR=nvim
export PATH=$HOME/.cargo/bin:$PATH
if [ -d "$HOME/.zshrc.d" ] && [ "$(ls -A $HOME/.zshrc.d)" ]; then
for file in $HOME/.zshrc.d/*; do
[ -r "$file" ] && source "$file"
done
fi
alias ls="eza"