-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
118 lines (100 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
# FIX-WSL: *:*: nice(5) failed: operation not permitted
unsetopt BG_NICE
# Run compaudit if zsh shows "Ignore insecure directories and continue [y] or abort compinit [n]?"
# And chmod 755 to all files listed
# key bindings
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[5~" beginning-of-history
bindkey "\e[6~" end-of-history
# bindkey "\e[3~" delete-char
# bindkey "\e[2~" quoted-insert
# bindkey "\e[5C" forward-word
# bindkey "\eOc" emacs-forward-word
# bindkey "\e[5D" backward-word
# bindkey "\eOd" emacs-backward-word
# bindkey "\ee[C" forward-word
# bindkey "\ee[D" backward-word
# bindkey "^H" backward-delete-word
# for rxvt
bindkey "\e[8~" end-of-line
bindkey "\e[7~" beginning-of-line
# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
# completion in the middle of a line
bindkey '^i' expand-or-complete-prefix
if [[ ! -e ~/antigen.zsh ]] ; then
# curl -k -L --retry 10 --retry-max-time 1800 git.io/antigen > ~/antigen.zsh ;
#if [[ 0 -ne $? ]]; then
LATEST_TAG_NAME="$(curl -s -L https://api.github.com/repos/zsh-users/antigen/releases/latest --connect-timeout 10 | grep 'tag_name' | grep -o -E 'v?[0-9]\.[v0-9\.]+' | head -n 1 )";
curl -k -L --retry 10 --retry-max-time 1800 https://github.com/zsh-users/antigen/releases/download/$LATEST_TAG_NAME/antigen.zsh -o ~/antigen.zsh ;
if [[ 0 -ne $? ]] && [[ -e ~/antigen.zsh ]]; then
rm -f ~/antigen.zsh;
fi
#fi
chmod +x ~/antigen.zsh
fi
source ~/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
# antigen bundle svn
antigen bundle tmux
antigen bundle heroku
# antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
antigen bundle colored-man-pages
antigen bundle man
antigen bundle colorize
# antigen bundle github
antigen bundle python
antigen bundle z
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-syntax-highlighting
# antigen bundle supercrabtree/k
# Load the theme.
antigen theme ys
# syntax color definition
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
typeset -A ZSH_HIGHLIGHT_STYLES
# ZSH_HIGHLIGHT_STYLES[command]=fg=white,bold
# ZSH_HIGHLIGHT_STYLES[alias]='fg=magenta,bold'
ZSH_HIGHLIGHT_STYLES[default]=none
ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=009
ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=009,standout
ZSH_HIGHLIGHT_STYLES[alias]=fg=cyan,bold
ZSH_HIGHLIGHT_STYLES[builtin]=fg=cyan,bold
ZSH_HIGHLIGHT_STYLES[function]=fg=cyan,bold
ZSH_HIGHLIGHT_STYLES[command]=fg=white,bold
ZSH_HIGHLIGHT_STYLES[precommand]=fg=white,underline
ZSH_HIGHLIGHT_STYLES[commandseparator]=none
ZSH_HIGHLIGHT_STYLES[hashed-command]=fg=009
ZSH_HIGHLIGHT_STYLES[path]=fg=214,underline
ZSH_HIGHLIGHT_STYLES[globbing]=fg=063
ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=white,underline
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=none
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=none
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=063
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=063
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=009
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=009
ZSH_HIGHLIGHT_STYLES[assign]=none
# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting
# disable git status
which git > /dev/null 2>&1;
if [[ $? -eq 0 ]]; then
antigen bundle git ;
antigen bundle git-prompt ;
git config --global oh-my-zsh.hide-status 1
git config --global oh-my-zsh.hide-info 1
fi
# Tell Antigen that you're done.
antigen apply