Fast, modern shell setup with < 200ms startup time using Zinit and Starship.
zshrc - Main configuration with pluginszshenv - Environment variablesaliases.zsh - 160+ command aliasesstarship.toml - Prompt configuration❮ prompt symbol in normal modeCtrl-X Ctrl-E opens the buffer in $EDITOR from
either mode (ESC v also works); Ctrl-Q (push-line-or-edit) stashes the
line — or, at a PS2 continuation prompt, pulls the whole construct back into
one editable buffer. Flow control is disabled (NO_FLOW_CONTROL) so
Ctrl-S/Ctrl-Q reach the line editor.Ctrl-R fuzzy history, Ctrl-T fuzzy file insert,
ESC c fuzzy cd — all backed by fd (honors .gitignore)# Zinit with turbo mode (deferred plugins load after prompt)
zinit light zsh-users/zsh-completions # Immediate (for first tab)
zinit wait lucid for fast-syntax-highlighting # Deferred
zinit wait lucid for zsh-autosuggestions # Deferred
zinit light agkozak/zsh-z # Deferred
# No OMZ plugins — curated aliases in aliases.zsh instead
# Navigation
alias ..="cd .."
alias ls="eza --icons"
# Git
alias gs="git status"
alias gc="git commit"
alias gp="git push"
# Development
alias v="nvim"
alias py="python3"
zinit wait for deferred loadingtime zsh -i -c exitzicompinitBoth Starship and vi-mode define zle-keymap-select causing infinite recursion.
# Fix in zshrc (see the "zle-keymap-select" comment block near Starship init)
if (( ${+widgets[zle-keymap-select]} )); then
zle -D zle-keymap-select 2>/dev/null
fi
After Starship initializes, zshrc REPLACES its widget with a leaf function
(_dotfiles-zle-keymap-select) that sets the vi-mode cursor shape and calls
zle reset-prompt — the exact body of Starship’s own widget, so the ❯/❮
symbol swap keeps working. The rule that keeps this safe: replace widgets,
never wrap them — wrapper chains are what recursed (“maximum nested function
level reached”).
Zsh vi mode binds backspace to vi-backward-delete-char, which can’t cross line boundaries
or backspace past the insert-mode entry point. Fixed by binding backward-delete-char in viins:
# Fix in zshrc (see the "vi mode backspace" comment block)
bindkey -M viins '^?' backward-delete-char
bindkey -M viins '^H' backward-delete-char
This is the zsh equivalent of vim’s set backspace=indent,eol,start.
Slow startup: Use zinit wait for plugins
Completions broken: Run rm -rf ~/.zcompdump* && exec zsh
Path duplicates: Add typeset -U path to zshenv
Debug: zsh -x -i -c exit 2>&1 | head -50