forked from chrishoage/zsh-dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
/
zshrc
executable file
·97 lines (75 loc) · 2.93 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
source ~/.zplug/zplug
isOSX="[[ $OSTYPE == *darwin* ]]"
isLinux="[[ $OSTYPE == *linux* ]]"
zplug "plugins/git-extra", from:oh-my-zsh, if:"which git"
zplug "plugins/rsync", from:oh-my-zsh
#zplug "plugins/tmux", from:oh-my-zsh, if:"which tmux"
zplug "plugins/common-aliases", from:oh-my-zsh
# macOS specifics
zplug "plugins/brew", from:oh-my-zsh, if:$isOSX
zplug "plugins/brew-cask", from:oh-my-zsh, if:$isOSX
#zplug "plugins/osx", from:oh-my-zsh, if:$isOSX
#zplug "knu/z", of:z.sh, nice:10
#zplug "rimraf/k", of:k.sh
zplug "zsh-users/zsh-completions", nice: 17
zplug "zsh-users/zsh-syntax-highlighting", nice:18
zplug "zsh-users/zsh-history-substring-search", nice:19
#zplug "zsh-users/zsh-autosuggestions", nice: 19
# Local scripts
zplug "~/.zsh", of:"*.zsh", from:local
zplug "~/.zsh", of:"extra.zsh", from:local, if:"[[ -f ~/.zsh/extra.zsh ]]"
DISABLE_AUTO_UPDATE="true"
DISABLE_AUTO_TITLE="false"
COMPLETION_WAITING_DOTS="true"
APPEND_HISTORY="true"
export TERM=xterm-256color
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
export PATH="$HOME/bin:$PATH"
export MANPATH="/usr/local/man:$MANPATH"
# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
zplug load
# Make vim the default editor
export EDITOR="vim"
# Larger bash history (allow 32³ entries; default is 500)
export HISTSIZE=32768
export HISTFILESIZE=$HISTSIZE
export HISTCONTROL=ignoredups
# Make some commands not show up in history
export HISTIGNORE="ls:ll:la:..:cd:cd -:pwd:exit:date:* --help"
# Highlight section titles in manual pages
export LESS_TERMCAP_md="$ORANGE"
# Don’t clear the screen after quitting a manual page
export MANPAGER="less -X"
# Link Homebrew casks in `/Applications` rather than `~/Applications`
#export HOMEBREW_CASK_OPTS="--appdir=/Applications"
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search # Up
bindkey "^[[B" down-line-or-beginning-search # Down
# bind UP and DOWN arrow keys
#zmodload zsh/terminfo
#bindkey "$terminfo[kcuu1]" history-substring-search-up
#bindkey "$terminfo[kcud1]" history-substring-search-down
#
## bind UP and DOWN arrow keys (compatibility fallback
## for Ubuntu 12.04, Fedora 21, and MacOSX 10.9 users)
#bindkey '^[[A' history-substring-search-up
#bindkey '^[[B' history-substring-search-down
# bind P and N for EMACS mode
bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down
# bind k and j for VI mode
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down