Skip to content

Instantly share code, notes, and snippets.

@reflechant
Forked from roman2ing/.zshrc
Last active September 14, 2024 17:12
Show Gist options
  • Save reflechant/fc7094499e1eeb4c7fbc6b0a0e2a1e3f to your computer and use it in GitHub Desktop.
Save reflechant/fc7094499e1eeb4c7fbc6b0a0e2a1e3f to your computer and use it in GitHub Desktop.
if [[ ! -e ~/.zcomet/bin ]]; then
git clone --depth=1 https://github.com/agkozak/zcomet.git ~/.zcomet/bin
fi
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
source ~/.zcomet/bin/zcomet.zsh
ZSH_AUTOSUGGEST_MANUAL_REBIND=1
zcomet load agkozak/zsh-z
zcomet load ohmyzsh plugins/gitfast
zcomet load ael-code/zsh-colored-man-pages
zcomet load zsh-users/zsh-syntax-highlighting
zcomet load zsh-users/zsh-autosuggestions
zcomet load zsh-users/zsh-history-substring-search
zcomet load romkatv/powerlevel10k
export NVM_DIR="$HOME/.nvm"
zcomet snippet "$NVM_DIR/nvm.sh"
zcomet snippet "$NVM_DIR/bash_completion"
zcomet compinit
source ~/.p10k.zsh
export HISTFILE=~/.zsh_history
export SAVEHIST=1000000
export HISTSIZE=10000000
# zsh-history-substring-search config
# bindkey '^[[A' history-substring-search-up # or '\eOA'
# bindkey '^[[B' history-substring-search-down # or '\eOB'
bindkey "^[[1;3A" history-substring-search-up
bindkey "^[[1;3B" history-substring-search-down
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
# easy navigation inside commands
bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment