-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
103 lines (68 loc) · 2.33 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
# uncomment to profile prompt startup with zprof
# zmodload zsh/zprof
# history
SAVEHIST=100000
# vim bindings
#bindkey -v
fpath=( "$HOME/.zfunctions" $fpath )
# antigen time!
source /usr/local/share/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 ohmyzsh/ohmyzsh
# Guess what to install when running an unknown command.
$b command-not-found
# Helper for extracting different types of archives.
$b extract
# 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@main
# 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
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
}
# disable until fixed
#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
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh