Skip to content

Instantly share code, notes, and snippets.

@JARVIS-AI
Forked from cristovao-trevisan/1 - .zshrc
Last active November 10, 2019 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JARVIS-AI/3ca5cb751dd2d0b83d736a5d2e6e7449 to your computer and use it in GitHub Desktop.
Save JARVIS-AI/3ca5cb751dd2d0b83d736a5d2e6e7449 to your computer and use it in GitHub Desktop.
zsh configuration using zplugin
# SDKMAN
export SDKMAN_DIR="/home/cristovao/.sdkman"
[[ -s "/home/cristovao/.sdkman/bin/sdkman-init.sh" ]] && source "/home/cristovao/.sdkman/bin/sdkman-init.sh"
# ZPLUGIN
## installer
source '/home/cristovao/.zplugin/bin/zplugin.zsh'
autoload -Uz _zplugin
(( ${+_comps} )) && _comps[zplugin]=_zplugin
## theme
zplugin light denysdovhan/spaceship-prompt
## autocompletion
zplugin ice wait"0" lucid blockf
zplugin light zsh-users/zsh-completions
zplugin ice wait"0" lucid atload"_zsh_autosuggest_start"
zplugin light zsh-users/zsh-autosuggestions
zplugin ice wait"0" lucid atinit"zpcompinit; zpcdreplay"
zplugin light zdharma/fast-syntax-highlighting
# others
zplugin ice wait"1" lucid
zplugin light lukechilds/zsh-nvm
zplugin light cristovao-trevisan/title-tab
## git
zplugin ice wait"2" lucid as"program" pick"bin/git-dsf"
zplugin light zdharma/zsh-diff-so-fancy
zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-now" make"prefix=$ZPFX install"
zplugin light iwata/git-now
zplugin ice wait"2" lucid as"program" pick"$ZPFX/bin/git-alias" make"PREFIX=$ZPFX" nocompile
zplugin light tj/git-extras
zplugin ice wait"2" lucid as"program" atclone'perl Makefile.PL PREFIX=$ZPFX' atpull'%atclone' \
make'install' pick"$ZPFX/bin/git-cal"
zplugin light k4rthik/git-cal
# SPACESHIP
SPACESHIP_KUBECONTEXT_SHOW=false
# HISTORY
## History file configuration
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
HISTSIZE=50000
SAVEHIST=10000
## History command configuration
setopt extended_history # record timestamp of command in HISTFILE
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show command with history expansion to user before running it
setopt inc_append_history # add commands to HISTFILE in order of execution
setopt share_history # share command history data
# SHORTCUTS
bindkey "^[[1;5D" backward-word # ctrl + arrow left
bindkey "^[[1;5C" forward-word # ctrl + arrow right
# configure zsh-diff-so-fancy
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
## color options
git config --global color.ui true
git config --global color.diff-highlight.oldNormal "red bold"
git config --global color.diff-highlight.oldHighlight "red bold 52"
git config --global color.diff-highlight.newNormal "green bold"
git config --global color.diff-highlight.newHighlight "green bold 22"
git config --global color.diff.meta "yellow"
git config --global color.diff.frag "magenta bold"
git config --global color.diff.commit "yellow bold"
git config --global color.diff.old "red bold"
git config --global color.diff.new "green bold"
git config --global color.diff.whitespace "red reverse"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment