-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
88 lines (62 loc) · 2.03 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
set -o vi
export EDITOR=vim
export VISUAL=vim
export GREP_COLOR='1;33'
# Use vi key bindings
bindkey -v
# Search backward incrementally for a specofied string
bindkey '^r' history-incremental-search-backward
# Emacs style
bindkey '^a' beginning-of-line
bindkey '^e' end-of-line
bindkey '^[[1;5C' emacs-forward-word
bindkey '^[[1;5D' emacs-backward-word
# Oh my zsh
export ZSH=$HOME/.oh-my-zsh
DISABLE_UPDATE_PROMPT=true
# TODO: wait for a bower plugin fix and add it & bundler,
# for now its conflicting with bundler
plugins=(
ant fasd battery brew cap cabal coffee docker cp gem
git github heroku history history-substring-search jruby knife lein
node npm osx perl python rails rake rsync ruby rvm scala sublime tmux
tmuxinator torrent vagrant vundle redis-cli web-search zeus bower
)
source $ZSH/oh-my-zsh.sh
source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
source $HOME/.zsh-history-substring-search/zsh-history-substring-search.zsh
source $HOME/.zsh-autosuggestions/autosuggestions.zsh
AUTOSUGGESTION_HIGHLIGHT_COLOR=9
# Enable autosuggestions automatically
zle-line-init() {
zle autosuggest-start
}
zle -N zle-line-init
# use ctrl+t to toggle autosuggestions(hopefully this wont be needed as
# zsh-autosuggestions is designed to be unobtrusive)
bindkey '^T' autosuggest-toggle
bindkey '^f' vi-forward-word
# bind P and N for EMACS mode
bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down
# Use either zsh plugins (fast) or antigen bundler (slow)
# source $HOME/.antigen-bundler
autoload -U promptinit && promptinit
# prompt pure
source $HOME/.powerline-shell
# disable annoying autocorrect feature
unsetopt correct_all
# auto predict
autoload predict-on
autoload predict-off
# on/off zsh autopredict
zle -N predict-on
zle -N predict-off
bindkey '^X1' predict-on
bindkey '^X2' predict-off
# Bootstrap
export DOTFILES=$HOME/.dotfiles
source $DOTFILES/.functions
source $DOTFILES/.aliases
source $DOTFILES/.git-aliases