2013-11-23 19:00:03 +00:00
|
|
|
# Load the functions, aliases, function etc.
|
2014-12-16 17:21:41 +00:00
|
|
|
for file in ~/dotfiles/zsh/{exports,aliases,functions}; do
|
2013-07-19 17:17:05 +00:00
|
|
|
[ -r "$file" ] && source "$file"
|
|
|
|
done
|
|
|
|
unset file
|
2012-09-09 09:42:27 +00:00
|
|
|
|
2013-11-24 17:52:33 +00:00
|
|
|
# a nice prompt
|
|
|
|
autoload -U promptinit && promptinit
|
|
|
|
prompt pure
|
|
|
|
|
|
|
|
# completions
|
|
|
|
autoload -U compinit && compinit -C
|
|
|
|
autoload bashcompinit && bashcompinit
|
|
|
|
|
|
|
|
# autocomplete for the git alias
|
|
|
|
compdef g=git
|
2014-09-19 16:08:36 +00:00
|
|
|
compdef gf=git-flow
|
2013-11-24 17:52:33 +00:00
|
|
|
|
|
|
|
# case-insensitive (all),partial-word and then substring completion
|
2014-09-19 16:08:36 +00:00
|
|
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
2012-10-09 17:05:32 +00:00
|
|
|
|
2015-05-25 10:01:46 +00:00
|
|
|
unsetopt menu_complete # do not autoselect the first completion entry
|
2013-11-24 17:52:33 +00:00
|
|
|
unsetopt flowcontrol
|
2015-05-25 10:01:46 +00:00
|
|
|
setopt auto_menu # show completion menu on succesive tab press
|
2013-11-24 17:52:33 +00:00
|
|
|
setopt complete_in_word
|
|
|
|
setopt always_to_end
|
2012-08-26 17:07:30 +00:00
|
|
|
|
2013-07-28 18:17:37 +00:00
|
|
|
|
2013-11-24 17:52:33 +00:00
|
|
|
# history settings
|
|
|
|
if [ -z $HISTFILE ]; then
|
|
|
|
HISTFILE=$HOME/.zsh_history
|
|
|
|
fi
|
|
|
|
HISTSIZE=10000
|
|
|
|
SAVEHIST=10000
|
|
|
|
|
2014-07-16 13:02:27 +00:00
|
|
|
bindkey '\e[A' history-beginning-search-backward
|
|
|
|
bindkey '\e[B' history-beginning-search-forward
|
|
|
|
|
2015-07-10 15:05:25 +00:00
|
|
|
# easy vim/terminal switch
|
|
|
|
zle -N fancy-ctrl-z
|
|
|
|
bindkey '^Z' fancy-ctrl-z
|
|
|
|
|
2013-11-24 17:52:33 +00:00
|
|
|
setopt append_history
|
|
|
|
setopt extended_history
|
|
|
|
setopt hist_expire_dups_first
|
|
|
|
setopt hist_ignore_dups # ignore duplication command history list
|
|
|
|
setopt hist_ignore_space
|
|
|
|
setopt hist_verify
|
|
|
|
setopt inc_append_history
|
|
|
|
setopt share_history # share command history data
|
|
|
|
|
2015-05-25 10:01:46 +00:00
|
|
|
# smart urls
|
2013-11-24 17:52:33 +00:00
|
|
|
autoload -U url-quote-magic
|
|
|
|
zle -N self-insert url-quote-magic
|
|
|
|
|
2015-05-25 10:01:46 +00:00
|
|
|
# jobs
|
2013-11-24 17:52:33 +00:00
|
|
|
setopt long_list_jobs
|
|
|
|
|
2016-08-19 09:30:48 +00:00
|
|
|
# source some zsh plugins
|
2013-11-24 17:52:33 +00:00
|
|
|
source $HOME/dotfiles/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
2016-05-31 11:40:03 +00:00
|
|
|
source $HOME/dotfiles/zsh/zsh-completions/zsh-completions.plugin.zsh
|
2013-11-24 17:52:33 +00:00
|
|
|
|
2016-08-19 09:30:48 +00:00
|
|
|
# nice dircolors for ls
|
2016-08-19 09:26:10 +00:00
|
|
|
export CLICOLOR=1
|
|
|
|
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
2014-09-19 16:08:36 +00:00
|
|
|
|
2014-11-19 11:08:43 +00:00
|
|
|
# fasd
|
|
|
|
eval "$(fasd --init auto)"
|
|
|
|
|
2016-05-31 11:40:03 +00:00
|
|
|
# nvm
|
2016-08-01 20:21:25 +00:00
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|