-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
109 lines (80 loc) · 2.46 KB
/
zshrc
File metadata and controls
109 lines (80 loc) · 2.46 KB
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
if [[ $+commands[tty] && $(tty) = "/dev/tty1" ]]; then
exec startx
fi
#
# Dependencies
#
[[ ! -d "$HOME/.zplug" ]] && git clone https://github.com/zplug/zplug "$HOME/.zplug"
source "$HOME/.zplug/init.zsh"
[[ ! -d "$HOME/.nvm" ]] && git clone https://github.com/creationix/nvm "$HOME/.nvm"
#
# Plugins
#
# Let zplug manage itself when using zplug update
zplug 'zplug/zplug', hook-build:'zplug --self-manage'
# Specify completions we want before the completion module
zplug "zsh-users/zsh-completions"
# Specify which zsh-utils modules we want
zplug "belak/zsh-utils", use:"editor/*.plugin.zsh"
zplug "belak/zsh-utils", use:"history/*.plugin.zsh"
zplug "belak/zsh-utils", use:"prompt/*.plugin.zsh"
zplug "belak/zsh-utils", use:"utility/*.plugin.zsh"
zplug "belak/zsh-utils", use:"completion/*.plugin.zsh"
# Load gitstatus for our prompt
zplug "romkatv/gitstatus"
# Specify additional external plugins we want
zplug "rupa/z", use:z.sh
#zplug "zsh-users/zsh-syntax-highlighting"
zplug "zdharma/fast-syntax-highlighting", defer:2
if ! zplug check; then
zplug install
fi
zplug load
#
# Settings
#
# Set any settings or overrides here - enable the prompt we want and ensure
# we're using emacs bindings.
prompt belak
bindkey -e
# Disable ^s and ^q
stty -ixon
# In order to group dirs together, we need to specify that we're grouping.
zstyle ':completion:*:matches' group 'yes'
zstyle ':completion:*' group-name ''
# List dirs first, to match what we do for ls.
zstyle ':completion:*' list-dirs-first true
#
# Aliases
#
alias json="python -mjson.tool"
# Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
# Remove -X and -F (exit if the content fits on one screen) to enable it.
export LESS='-F -g -i -M -R -S -w -X -z-4'
#
# Functions
#
# Load functions from our fpath
autoload j
gocover () {
t="/tmp/go-cover.$$.tmp"
go test -coverprofile=$t $@ && go tool cover -html=$t && unlink $t
}
#
# Additional Bundles
#
# Load fzf. This will usually be installed when neovim plugins are installed.
if [[ -f ~/.fzf.zsh ]] source ~/.fzf.zsh
if (( $+commands[pyenv] )); then
eval "$(pyenv init -)"
fi
if (( $+commands[pyenv-virtualenv-init] )); then
eval "$(pyenv virtualenv-init -)"
fi
if (( $+commands[rbenv] )); then
eval "$(rbenv init -)"
fi
# Make it possible to add per-machine customizations.
if [[ -f ~/.zshrc.local ]] source ~/.zshrc.local
#if [[ -f ~/.iterm2_shell_integration.zsh ]] source ~/.iterm2_shell_integration.zsh