dotfiles/.zshrc

103 lines
2.6 KiB
Bash
Raw Normal View History

2021-10-05 11:23:27 +00:00
#source $HOME/.antigen.zsh
2017-09-01 12:43:51 +00:00
source $HOME/.aliases
2017-09-28 10:38:59 +00:00
# Set $PATH
export PATH=$HOME/bin:$PATH
2020-03-20 11:43:45 +00:00
# Set Golang
export PATH=$PATH:/usr/local/go/bin
2021-07-11 14:06:47 +00:00
export GOPATH=$HOME/Projects/golang
2020-03-20 11:43:45 +00:00
export PATH=$PATH:$GOPATH/bin
2021-07-11 14:06:47 +00:00
2021-10-07 14:15:45 +00:00
# History
export HISTFILE=$HOME/.zsh_history
export HISTSIZE=15000 # keep 15,000 lines in memory
export SAVEHIST=10000 # but save only 10,000 of them
2019-02-11 16:43:02 +00:00
# VTE
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
source /etc/profile.d/vte.sh
fi
2020-01-21 09:29:28 +00:00
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/matus/bin/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/matus/bin/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/matus/bin/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/matus/bin/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
2021-07-11 14:06:47 +00:00
#
# >>> Lazy NVM >>>
lazynvm() {
unset -f nvm node npm
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
}
nvm() {
lazynvm
nvm $@
}
node() {
lazynvm
node $@
}
npm() {
lazynvm
npm $@
}
# <<< Lazy NVM <<<
2021-10-05 11:23:27 +00:00
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
### End of Zinit's installer chunk
2021-10-06 12:59:29 +00:00
# Zinit plugins and themes
# Must Load OMZ Git library
zinit snippet OMZL::git.zsh
# Load Git plugin from OMZ
zinit snippet OMZP::git
zinit cdclear -q # <- forget completions provided up to this moment
2021-10-05 11:23:27 +00:00
zinit light zinit-zsh/z-a-meta-plugins
2021-10-07 14:15:45 +00:00
zinit light zsh-users/zsh-history-substring-search
2021-10-05 11:23:27 +00:00
zinit snippet OMZ::plugins/pip/pip.plugin.zsh
zinit snippet OMZ::plugins/docker-compose/docker-compose.plugin.zsh
zinit snippet OMZ::plugins/docker/_docker
zinit snippet OMZ::plugins/command-not-found/command-not-found.plugin.zsh
2021-10-06 12:59:29 +00:00
zinit for annexes zsh-users+fast zdharma
2021-10-05 11:23:27 +00:00
2021-10-07 14:15:45 +00:00
setopt prompt_subst
2021-10-05 11:23:27 +00:00
zinit wait'!' lucid for \
OMZL::prompt_info_functions.zsh \
OMZT::gentoo
2021-10-07 14:15:45 +00:00
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down