Skip to content

Instantly share code, notes, and snippets.

@pyratin
Last active April 11, 2026 02:42
Show Gist options
  • Select an option

  • Save pyratin/0354c75f8a1167111593b21fd2ceb6cb to your computer and use it in GitHub Desktop.

Select an option

Save pyratin/0354c75f8a1167111593b21fd2ceb6cb to your computer and use it in GitHub Desktop.
.zshrc
plugins=(
git
zsh-autosuggestions
fast-syntax-highlighting
fzf-tab
)
# Auto-install plugins if they are missing
for plugin in $plugins; do
if [[ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/$plugin" && "$plugin" != "git" ]]; then
echo "Installing plugin: $plugin"
case $plugin in
zsh-autosuggestions) git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ;;
fast-syntax-highlighting) git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting ;;
fzf-tab) git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fzf-tab ;;
esac
fi
done
setopt nosharehistory
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_REDUCE_BLANKS
export EDITOR=nvim
export NNN_COLORS=2345
source <(fzf --zsh)
export FZF_TMUX_OPTS
export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment