-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
118 lines (87 loc) · 3.15 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
# ------------------------- zplugin modules
if [[ ! -d ~/.zplugin/bin/zmodules/Src ]]; then
module_path+=( "~/.zplugin/bin/zmodules/Src" )
zmodload zdharma/zplugin
fi
# ------------------------- variables
# ----------- locale
export LANGUAGE=ja_JP.UTF-8
export LC_ALL=ja_JP.UTF-8
export LANG=ja_JP.UTF-8
# ----------- terminfo
export TERM=xterm-256color
# ----------- local
export HOME_LOCAL="${HOME}/.local/"
# ----------- man
export MANPATH="${HOME_LOCAL}/man:/usr/local/man:${MANPATH}"
# ----------- editor
export EDITOR="\\nvim"
# ----------- golang
export GOPATH=$HOME
# ----------- python
export PIPENV_VENV_IN_PROJECT=true
# ----------- prompt setting
export PURE_POWER_MODE=modern
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito'
# ----------- path
export PATH="$HOME/.cargo/bin:/usr/local/opt/llvm/bin:${HOME}/bin:${HOME}/.local/bin:/usr/local/bin:${HOME}/dotfiles/bin:${PATH}"
# ------------------------- zplugin
# auto install zplugin
if [[ ! -d ~/.zplugin/bin ]]; then
mkdir -p ~/.zplugin
git clone https://github.com/zdharma/zplugin.git ~/.zplugin/bin
fi
declare -A ZPLGM
ZPLGM[COMPINIT_OPTS]=-C
source "$HOME/.zplugin/bin/zplugin.zsh"
# auto install zplugin module
if [[ ! -d ~/.zplugin/bin/zmodules/Src ]]; then
zplugin module build
fi
zplugin ice depth=1; zplugin light romkatv/powerlevel10k
# zplugin snippet https://github.com/sainnhe/edge/blob/master/zsh/.zsh-pure-power-dark
zplugin ice wait"0" lucid; zplugin light mollifier/anyframe
zplugin ice wait"0" lucid as"program" from"gh-r" mv"fzf-* -> fzf"; zplugin light junegunn/fzf-bin
zplugin ice wait"0" lucid as"program" from"gh-r" pick"*/ghq"; zplugin light x-motemen/ghq
zplugin ice wait"0" lucid as"program" from"gh-r" mv"jq-* -> jq"; zplugin light stedolan/jq
zplugin ice wait"0" lucid atload"_zsh_autosuggest_start"
zplugin light zsh-users/zsh-autosuggestions
zplugin ice wait"0" lucid atinit"zpcompinit; zpcdreplay"
zplugin light zdharma/fast-syntax-highlighting
# ------------------------- basic options
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt share_history
setopt inc_append_history
setopt hist_ignore_all_dups
setopt hist_ignore_dups
setopt hist_verify
setopt hist_reduce_blanks
setopt extended_glob
# ------------------------- functions
# ------------------------- events
# ------------------------- alias
alias dkc=docker-compose
# ------------------------- key binding
# ----------- viins
bindkey -v
bindkey -v '^?' backward-delete-char
# ----------- 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
# ----------- anyframe
bindkey '^r' anyframe-widget-cd-ghq-repository
# ----------- tmux
# iTerm integrated tmux on ssh session
function smux() {
ssh $* -t "tmux -u -CC new -A -s smux-\${\$(hostname)//\\./-}"
}
# ------------------------- load asdf
. $HOME/.asdf/asdf.sh
fpath=($HOME/.asdf/completions $fpath)
# ------------------------- p10k
[[ -f ${SETTINGS_ROOT}/.p10k.zsh ]] && source ${SETTINGS_ROOT}/.p10k.zsh