Skip to content

Instantly share code, notes, and snippets.

@arnos-stuff
Last active December 23, 2022 20:51
Show Gist options
  • Save arnos-stuff/1d2378d63bed6342eb6c6708a470145c to your computer and use it in GitHub Desktop.
Save arnos-stuff/1d2378d63bed6342eb6c6708a470145c to your computer and use it in GitHub Desktop.
my .zshrc as of 04/12/2022
# zi setup
source ~/.zi/bin/zi.zsh
# Use modern completion system
skip_global_compinit=1
zi compinit
# zi added metaplugins
# zi light z-shell/z-a-meta-plugins
# zi light-mode for @zsh-users @console-tools @fuzzy @z-shell @annexes+rec
zi light z-shell/z-a-bin-gem-node
zi light z-shell/z-a-meta-plugins
zi light jirutka/zsh-shift-select
zi ice lucid wait as'completion' blockf has'poetry'
zi ice lucid wait has'fzf'
zi light Aloxaf/fzf-tab
# # Set up the prompt
eval "$(oh-my-posh init zsh --config ~/.oh-my-posh/themes/arno-pure.omp.json)"
# zi lucid for pick"/dev/null" multisrc"{async,pure}.zsh" \
# atload"!prompt_pure_precmd" nocd \
# sindresorhus/pure
. /home/linuxbrew/.linuxbrew/etc/profile.d/z.sh
setopt histignorealldups sharehistory
setopt append_history # Allow multiple sessions to append to one Zsh command history.
setopt extended_history # Show timestamp in history.
setopt hist_expire_dups_first # Expire A duplicate event first when trimming history.
setopt hist_find_no_dups # Do not display a previously found event.
setopt hist_ignore_all_dups # Remove older duplicate entries from history.
setopt hist_ignore_dups # Do not record an event that was just recorded again.
setopt hist_ignore_space # Do not record an Event Starting With A Space.
setopt hist_reduce_blanks # Remove superfluous blanks from history items.
setopt hist_save_no_dups # Do not write a duplicate event to the history file.
setopt hist_verify # Do not execute immediately upon history expansion.
setopt inc_append_history # Write to the history file immediately, not when the shell exits.
setopt share_history # Share history between different instances of the shell.
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
zstyle ':completion:*' completer _complete _match _approximate
zstyle ':completion:*:match:*' original only
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)'
export NVM_DIR="$HOME/.nvm"
[ -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" ] && \. "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
# ctrl+shift+arrow behavior
bindkey "\e[1;6C" forward-word
bindkey "\e[1;6D" backward-word
### ctrl+arrows
bindkey "\e[1;5C" forward-word
bindkey "\e[1;5D" backward-word
# urxvt
bindkey "\eOc" forward-word
bindkey "\eOd" backward-word
### ctrl+delete
bindkey "\e[3;5~" kill-word
# urxvt
bindkey "\e[3^" kill-word
### ctrl+backspace
bindkey '^H' backward-kill-word
### ctrl+shift+delete
bindkey "\e[3;6~" kill-line
# urxvt
bindkey "\e[3@" kill-line
# path
path+=/home/arnov/.local/bin
path+=/mnt/c/Users/arnov/AppData/Local/Pandoc
# windows path
winhome='/mnt/c/Users/arnov/'
# aliases
alias ls='ls --color=auto'
alias ll='ls -l'
alias la='ls -A'
alias ghgist='_ghgist(){ mkdir -p /tmp/ghghist ; code -w "/tmp/ghghist/$2.$1" ; cat /tmp/ghghist/$2.$1 | gh gist create -d "$3" -p -f "$2.$1" | rm -rf /tmp/ghghist/$2.$1}; _ghgist'
alias cdproj='_cdproj(){ code /home/arnov/code/small-projects/$1}; _cdproj'
alias cdapp='_cdproj(){ code /home/arnov/code/apps/$1/$2}; _cdproj'
alias cdeupol='cdproj eupol'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment