Claude Tips mascot
Claude Tips & Tricks
Claude Code intermediate

Enable Vim Mode for Faster Prompt Editing

Toggle Vim keybindings in Claude Code's input area with /vim for efficient text editing, cursor navigation, and prompt manipulation.

Claude Code has built-in Vim mode for its input area. Modal editing, motions, and text objects, right in the prompt editor.

Enable It

/vim          # Toggle vim mode for this session
/config       # Enable permanently in settings

What Works

  • Modes: INSERT, NORMAL (Escape switches to NORMAL)
  • Motions: w, b, e, 0, $, gg, G, f{char}, t{char}
  • Text objects: ciw (change inner word), di" (delete inside quotes), ca( (change around parens)
  • Operations: d, c, y, p, u (undo), Ctrl+r (redo)

Key Detail

Vim mode and the keybinding system operate independently. In Vim mode, Escape handles mode switching (not chat:cancel). Most Ctrl+key shortcuts pass through to the keybinding system, so Ctrl+T still works for the task list.

Custom Keybindings

Run /keybindings to open ~/.claude/keybindings.json for further customization. Changes are hot-reloaded without restarting.

Especially useful when writing multi-line prompts or editing complex instructions inline.

Paste into Claude Code
/vim