diff --git a/.zshrc b/.zshrc index 668b7e2..488958f 100644 --- a/.zshrc +++ b/.zshrc @@ -139,6 +139,12 @@ alias ...="cd ../.." # Robust keybinds for navigation and editing (support most terminals) # ===================== +# Ensure Emacs keymap is set before custom bindings so later changes don't reset them +bindkey -e + +# Load terminfo module for $terminfo[] and echoti +zmodload zsh/terminfo 2>/dev/null || true + # VSCode terminal compatibility detection export IS_VSCODE_TERM=0 if [[ "$TERM_PROGRAM" == "vscode" ]] || [[ -n "$VSCODE_IPC_HOOK_CLI" ]]; then @@ -256,10 +262,8 @@ autoload -Uz compinit && compinit # Keybinds (Navigation, Editing, FZF, Completion) # ===================== -# Emacs mode by default (comment out for vi mode) -bindkey -e -# Uncomment below for vi mode -# bindkey -v +# Emacs/vi mode selection handled earlier to avoid resetting custom binds +# bindkey -v # Uncomment to use vi mode instead # History search bindkey '^R' fzf-history-widget # fzf history search (fzf-tab)