Last active
January 24, 2024 18:38
-
-
Save xevrem/7b29650ae5c91e3edc6acbd313b1b9b2 to your computer and use it in GitHub Desktop.
zinit .zshrc additions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" | |
| [ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)" | |
| [ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" | |
| source "${ZINIT_HOME}/zinit.zsh" | |
| ### End of Zinit's installer chunk | |
| zinit ice wait'0a' lucid atload"_zsh_autosuggest_start" | |
| zinit light zsh-users/zsh-autosuggestions | |
| zinit ice wait'0b' lucid blockf atpull'zinit creinstall -q .' | |
| zinit light zsh-users/zsh-completions | |
| zinit ice wait'0c' lucid | |
| zinit light zdharma-continuum/history-search-multi-word | |
| zinit ice wait'0d' lucid atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" | |
| zinit light zdharma-continuum/fast-syntax-highlighting | |
| zinit ice wait'0e' lucid atclone="mkdir ~/.config/fsh;cp ./themes/*.ini ~/.config/fsh/.;fast-theme -q XDG:catppuccin-mocha" | |
| zinit light catppuccin/zsh-fsh | |
| zinit ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh' | |
| zinit light sindresorhus/pure | |
| #zinit ice wait'0f' lucid | |
| #zinit snippet ~/.rtx.zsh | |
| #zinit ice wait'0g' lucid | |
| #zinit snippet ~/.zoxide.zsh | |
| setopt inc_append_history # save commands are added to the history immediately, otherwise only when shell exits. | |
| setopt histignorespace # Don't save commands that start with space | |
| setopt appendhistory # Immediately append history instead of overwriting | |
| setopt histignorealldups # If a new command is a duplicate, remove the older oneHISTFILE=~/.zhistory | |
| HISTSIZE=10000 | |
| HISTFILE=~/.zhistory | |
| SAVEHIST=10000 | |
| export HOMEBREW_PREFIX="/opt/homebrew" | |
| export HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}" | |
| export HOMEBREW_DEFAULT_CACHE=$HOME/Library/Caches/Homebrew | |
| export HOMEBREW_CACHE=$HOME/Library/Caches/Homebrew | |
| export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=~/Library/Fonts" | |
| export HOMEBREW_CELLAR="${HOMEBREW_PREFIX}/Cellar"; | |
| export MANPATH="${HOMEBREW_PREFIX}/share/man${MANPATH+:$MANPATH}:"; | |
| export INFOPATH="${HOMEBREW_PREFIX}/share/info:${INFOPATH:-}"; | |
| # export SHELL=/bin/zsh | |
| export SHELL=/usr/bin/zsh | |
| export TERM=xterm-256color | |
| export COLORTERM=truecolor | |
| export LSP_USE_PLISTS=true | |
| export JSON_ALLOW_NUL=true | |
| export RUSTC_WRAPPER=/usr/bin/sccache | |
| export SCCACHE_DIR=/run/media/erika/buildcache/sccache | |
| export CCACHE_DIR=/run/media/erika/buildcache/ccache | |
| #export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket | |
| export LDFLAGS="-L$HOMEBREW_PREFIX/lib" | |
| export CPPFLAGS="-I$HOMEBREW_PREFIX/include" | |
| export CFLAGS="-I$HOMEBREW_PREFIX/include" | |
| #export EDITOR=$HOME/.cargo/bin/hx | |
| #export NODE_OPTIONS=--use-openssl-ca | |
| export PATH=$HOMEBREW_PREFIX/sbin:$PATH | |
| export PATH=$HOMEBREW_PREFIX/bin:$PATH | |
| export PATH=$HOMEBREW_PREFIX/opt:$PATH | |
| export PATH=$HOMEBREW_PREFIX/opt/gcc/bin:$PATH | |
| export PATH=$HOME/.cargo/bin:$PATH | |
| export PATH=$HOME/.local/bin:$PATH | |
| #export PATH=$HOME/.local/bin/elixir:$PATH | |
| #export PATH=$HOME/.dotnet/tools/csharp-ls:$PATH | |
| #export PATH=$HOME/Applications/Emacs.app/Contents/MacOS/bin:$PATH | |
| alias em="emacs -nw" | |
| alias et="emacsclient -ta ''" | |
| alias ec="emacsclient -cna ''" | |
| alias hx="helix" | |
| alias l="eza" | |
| alias ls="eza" | |
| alias ll="eza -l" | |
| alias la="eza -la" | |
| alias lg="eza -la --git" | |
| gsquash(){ | |
| revisions=$(git rev-list --count HEAD ^origin/develop); | |
| git reset --soft HEAD~$revisions; | |
| } | |
| # keybinds | |
| bindkey -e | |
| bindkey '^[[7~' beginning-of-line # Home key | |
| bindkey '^[[H' beginning-of-line # Home key | |
| if [[ "${terminfo[khome]}" != "" ]]; then | |
| bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line | |
| fi | |
| bindkey '^[[8~' end-of-line # End key | |
| bindkey '^[[F' end-of-line # End key | |
| if [[ "${terminfo[kend]}" != "" ]]; then | |
| bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line | |
| fi | |
| bindkey '^[[2~' overwrite-mode # Insert key | |
| bindkey '^[[3~' delete-char # Delete key | |
| bindkey '^[[C' forward-char # Right key | |
| bindkey '^[[D' backward-char # Left key | |
| bindkey '^[[5~' history-beginning-search-backward # Page up key | |
| bindkey '^[[6~' history-beginning-search-forward # Page down key | |
| # Navigate words with ctrl+arrow keys | |
| bindkey '^[Oc' forward-word # | |
| bindkey '^[Od' backward-word # | |
| bindkey '^[[1;5D' backward-word # | |
| bindkey '^[[1;5C' forward-word # | |
| bindkey '^H' backward-kill-word # delete previous word with ctrl+backspace | |
| bindkey '^[[Z' undo # Shift+tab undo last action | |
| # sourcing and evals | |
| #eval "$(rtx activate zsh)" | |
| #eval "$(zoxide init zsh)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment