-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
91 lines (71 loc) · 2.49 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
source "$HOME/.zprofile"
# load our own completion functions
fpath=($DOTFILES/zsh/completion $fpath)
# load brew installed completion functions
if [ -d /usr/local/share/zsh/site-functions ]; then
fpath=(/usr/local/share/zsh/site-functions $fpath)
fi
# completion
autoload -U compinit
compinit
# load functions
for function in $DOTFILES/zsh/functions/*; do
source $function
done
# history settings
HISTFILE="$HOME/.zsh_history"
setopt histignoredups
SAVEHIST=4096
HISTSIZE=4096
# asesome cd movements from zshkit
setopt autocd autopushd pushdminus pushdsilent pushdtohome cdablevars
DIRSTACKSIZE=5
# Try to correct command line spelling
setopt correct correctall
# Enable extended globbing
setopt extendedglob
# Allow [ or ] wherever you want
unsetopt nomatch
# Vi mode
bindkey -v
bindkey "^F" vi-cmd-mode
bindkey jj vi-cmd-mode
# Handy keybindings
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey "^R" history-incremental-search-backward
bindkey "^P" history-search-backward
bindkey "^Y" accept-and-hold
bindkey "^N" insert-last-word
bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"
# Use vim as the visual editor
export VISUAL=code
export EDITOR=$VISUAL
# Local config
[[ -f $HOME/.zshrc.local ]] && source $HOME/.zshrc.local
# aliases
[[ -f $DOTFILES/aliases ]] && source $DOTFILES/aliases
# Load Python virtualenvwrapper if available
if [ -f "/usr/local/bin/virtualenvwrapper.sh" ]; then
export WORKON_HOME=$HOME/Projects/.envs
if [ -d "$WORKON_HOME" ]; then
mkdir -p $WORKON_HOME
fi
source /usr/local/bin/virtualenvwrapper.sh
fi
if [ -d "$HOME/.rvm/bin" ]; then
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
fi
source "$DOTFILES/zsh/antigen.zsh"
antigen-bundle Tarrasch/zsh-autoenv # Auto loads any file named ".authenv.zsh"
antigen apply
export PAGER=less
export PATH="/usr/local/sbin:$PATH"
eval $(/usr/libexec/path_helper -s)
# tabtab source for serverless package
# uninstall by removing these lines or running `tabtab uninstall serverless`
[[ -f /usr/local/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh ]] && . /usr/local/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh
# tabtab source for sls package
# uninstall by removing these lines or running `tabtab uninstall sls`
[[ -f /usr/local/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh ]] && . /usr/local/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh
[[ -f $HOME/.zshrc.local ]] && source $HOME/.zshrc.local