-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.zshrc
executable file
·160 lines (133 loc) · 3.71 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
151
152
153
154
155
156
157
158
159
160
# .zshrc
# author: borysn
# license: what's a license?
################
# basic config #
################
umask 077
ZDOTDIR=${ZDOTDIR:-${HOME}}
TERM=rxvt-unicode-256color
HISTFILE=${ZDOTDIR}/.zsh/.histfile
HISTSIZE=10000
SAVEHIST=${HISTSIZE}
export EDITOR=nvim
export BROWSER=firefox
export TMP=$ZDOTDIR/.tmp
export TEMP=$TMP
export TMPDIR=$TMP
export TMPPREFIX=$TMPDIR/zsh
if [ ! -d $TMP ]; then mkdir $TMP; fi
########
# path #
########
export PATH=$PATH:~/.local/scripts
export PATH=$PATH:~/.npm/bin
export PATH=$PATH:~/.gem/ruby/2.4.0/bin
export VIRTUAL_ENV_DISABLE_PROMPT=1
#source $HOME/.local/python/user/bin/activate
################
# load plugins #
################
autoload -Uz zutil
autoload -Uz compinit
autoload -Uz promptinit
autoload -Uz colors
autoload -Uz up-line-or-beginning-search
autoload -Uz down-line-or-beginning-search
######################
# plugin activiation #
######################
compinit
promptinit
prompt gentoo
colors
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
##############
# completion #
##############
zstyle ':completion:*' menu select
zstyle ':completion:*' use-cache 1
zstyle ':completion:*' cache-path ~/.zsh/cache
zstyle ':completion:*:descriptions' format '%U%S%d%b%u'
zstyle ':completion:*:warnings' format '%Swaaahh? %d%b'
zstyle ':completion:*' _completer _complete _match _approximate
zstyle ':completion:*:match:*' original only
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'
zstyle ':completion:*:function' ignored-patterns '_*'
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:kill:*' force-list always
zstyle ':completion:*' squeeze-slashes true
zstyle ':completion:*:cd:*' ignore-parents parent pwd
zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin
########
# opts #
########
setopt correctall
setopt complete_aliases
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt autocd
setopt extendedglob
setopt noflowcontrol
################
# key bindings #
################
bindkey -v
typeset -g -A key
bindkey '^[[1~' beginning-of-line #home
bindkey '^[[2~' overwrite-mode #insert
bindkey '^[[3~' delete-char #delete
bindkey '^[[4~' end-of-line #end
bindkey '^[[5~' up-line-or-history #pageup
bindkey '^[[6~' down-line-or-history #pagedown
bindkey '^[[A' up-line-or-search #up
bindkey '^[[B' down-line-or-search #down
bindkey '^[[C' forward-char #right
bindkey '^[[D' backward-char #left
# for rxvt
bindkey '^A' beginning-of-line #ctrl-a
bindkey '^E' end-of-line #ctrl-e
[[ -n '$key[Up]' ]] && bindkey -- '$key[Up]' up-line-or-beginning-search
[[ -n '$key[Down]' ]] && bindkey -- '$key[Down]' down-line-or-beginning-search
##########
# alias' #
##########
alias clock='tty-clock -c -C 2 -t'
alias reboot='sudo systemctl reboot'
alias poweroff='sudo systemctl poweroff'
alias halt='sudo systemctl halt'
alias ls='ls --color=auto --human-readable --group-directories-first --classify'
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias cp='cp -iv'
alias mv='mv -iv'
alias rmdir='rmdir -v'
alias ln='ln -v'
alias chmod='chmod -c'
alias chown='chown -c'
alias mkdir='mkdir -v'
if command -v colordiff > /dev/null 2>&1; then
alias diff='colordiff -Nuar'
else
alias diff='diff -Nuar'
fi
# Resource files
#for file in $HOME/.zsh/rc/*.rc; do
# source $file
#done
#########
# alert #
#########
if [ -f ~/.alert ]; then echo '>>> check ~/.alert'; fi
#########
# other #
#########
# vim ternjs
ulimit -n 2048
##########
# sdkman #
##########
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR='/home/p3pt/.sdkman'
[[ -s '/home/p3pt/.sdkman/bin/sdkman-init.sh' ]] && source '/home/p3pt/.sdkman/bin/sdkman-init.sh'