-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
115 lines (85 loc) · 2.94 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
# remove zsh history size limits
export HISTSIZE=1000000000
export SAVEHIST=$HISTSIZE
setopt EXTENDED_HISTORY
# Base16 Shell, for coloring asthetic
BASE16_SHELL="$HOME/.config/base16-shell/"
[ -n "$PS1" ] && \
[ -s "$BASE16_SHELL/profile_helper.sh" ] && \
eval "$("$BASE16_SHELL/profile_helper.sh")"
# fix colors in tmux
export TERM="xterm-256color"
# if [ "$TMUX" = "" ]; then tmux -2; fi
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
ZSH_THEME="robbyrussell"
# Case sensitive completion must be off. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
# Uncomment the following line to change how often to auto-update (in days).
export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
plugins=(
osx
# taskwarrior
git
fasd
zsh-syntax-highlighting
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
# This speeds up pasting w/ autosuggest
# https://github.com/zsh-users/zsh-autosuggestions/issues/238
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
# Preferred editor for local and remote sessions
export EDITOR='vim'
# ssh
export SSH_KEY_PATH="~/.ssh/rsa_id"
export PATH=~/Library/Python/3.6/bin:$PATH
autoload -U promptinit; promptinit
# set pureshell prompt
prompt pure
# automatically generated by fzf setup
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# tab completion for colorls
#source $(dirname $(gem which colorls))/tab_complete.sh
#alias ls=colorls
#alias l="colorls -lA --sd"
alias devup="(cd ~/.dotfiles && git pull) && sudo ansible-playbook ~/.dotfiles/local.yml --extra-vars username=$(whoami)"
# pretty print json strings
alias json="python -m json.tool"
alias atom="atom -a"
alias learn="atom ~/Code.nosync/Learn-Something-Every-Day"
alias lyrics="open \"https://www.google.com/search?q=\$(spotify status | grep Track | sed 's/Track\: //g')lyrics pinyin\""
# modify history settings
setopt hist_ignore_dups share_history inc_append_history extended_history
#disable auto correct
unsetopt correct_all
# Load any unsynchronized local zshrc configurations and settings
if [ -f ~/.zshrc.local ]; then
source ~/.zshrc.local
fi
# Load taskwarrior aliases and functions
if [ -f ~/.zshrc-taskwarrior ]; then
source ~/.zshrc-taskwarrior
fi
better_gist() {
gist $1 | pbcopy && echo "$1 copied!"
}
alias gist=better_gist
# use gomodules when in GOPATH
export GO111MODULE=on
alias gb="git branch --sort=-committerdate --all"
# adds fast delete previous word to match other GUI applications
bindkey '^H' backward-kill-word
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi