forked from paulirish/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
117 lines (72 loc) · 2.45 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
# uncomment to profile prompt startup with zprof
# zmodload zsh/zprof
# history
SAVEHIST=100000
# vim bindings
bindkey -v
fpath=( "$HOME/.zfunctions" $fpath )
# antigen time!
source ~/code/antigen/antigen.zsh
######################################################################
### install some antigen bundles
local b="antigen-bundle"
# Don't load the oh-my-zsh's library. Takes too long. No need.
# antigen use oh-my-zsh
# Guess what to install when running an unknown command.
$b command-not-found
# Helper for extracting different types of archives.
$b extract
# atom editor
$b atom
# homebrew - autocomplete on `brew install`
$b brew
$b brew-cask
# Tracks your most used directories, based on 'frecency'.
$b robbyrussell/oh-my-zsh plugins/z
# nicoulaj's moar completion files for zsh -- not sure why disabled.
# $b zsh-users/zsh-completions src
# Syntax highlighting on the readline
$b zsh-users/zsh-syntax-highlighting
# history search
$b zsh-users/zsh-history-substring-search ./zsh-history-substring-search.zsh
# suggestions
$b tarruda/zsh-autosuggestions
# colors for all files!
$b trapd00r/zsh-syntax-highlighting-filetypes
# dont set a theme, because pure does it all
$b mafredri/zsh-async
$b sindresorhus/pure
# Tell antigen that you're done.
#antigen apply
###
#################################################################################################
# bind UP and DOWN arrow keys for history search
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
# config for suggestions
AUTOSUGGESTION_ACCEPT_RIGHT_ARROW=1
export PURE_GIT_UNTRACKED_DIRTY=0
# Automatically list directory contents on `cd`.
auto-ls () {
emulate -L zsh;
# explicit sexy ls'ing as aliases arent honored in here.
hash gls >/dev/null 2>&1 && CLICOLOR_FORCE=1 gls -aFh --color --group-directories-first || ls
}
chpwd_functions=( auto-ls $chpwd_functions )
# Enable autosuggestions automatically
zle-line-init() {
zle autosuggest-start
}
zle -N zle-line-init
# history mgmt
# http://www.refining-linux.org/archives/49/ZSH-Gem-15-Shared-history/
setopt inc_append_history
setopt share_history
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
# uncomment to finish profiling
# zprof
# Load default dotfiles
source ~/.bash_profile
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh