6.3 Vim Mode
Course: Claude Code - Power User Section: Advanced Input & Interaction Video Length: 2-5 minutes Presenter: Daniel Treasure
Opening Hook
Vim mode brings keyboard-driven editing to Claude Code. If you live in a terminal and know Vim, this is your native habitat—edit long prompts and code without ever reaching for the mouse.
Key Talking Points
1. What is Vim Mode?
- A modal editor style with two modes: Insert (i) and Normal (Esc)
- Keyboard-only navigation and editing (no mouse required)
- Familiar to developers who use Vim, Neovim, or terminal editors
- Available in Claude Code UI and terminal variants
- Speeds up editing long, complex prompts
What to say: "Vim mode is for people who think in keystrokes. If you're comfortable with Vim, you can edit a multi-line prompt without touching the mouse. hjkl navigation, d to delete, y to yank, p to paste—all the classics."
What to show on screen: Open Claude Code, navigate to settings, show Vim mode toggle in /config → Editor mode menu
2. When to Use Vim Mode
- You're already a Vim user (muscle memory applies)
- Editing long, complex prompts with many lines
- Refining and reworking prompt text repeatedly
- Terminal-based workflows where mouse use is awkward
- Rapid prototyping with quick edits
What to say: "Vim mode isn't mandatory. If you don't know Vim, learning it just for Claude Code isn't worth the time. But if you already know Vim, enabling it makes Claude feel native to your workflow."
What to show on screen: Show a before/after of editing a multi-line prompt—with Vim mode vs. without
3. Core Vim Keybindings in Claude Code
- i — Enter Insert mode
- Esc — Return to Normal mode
- dd — Delete the current line
- yy — Yank (copy) the current line
- p — Paste below the cursor
- u — Undo
- h/j/k/l — Move left, down, up, right
- w/b — Jump to next/previous word
- gg — Go to beginning of text
- G — Go to end of text
- dw — Delete a word
- d$ — Delete to end of line
What to say: "If you know Vim, most of these work as expected. The common moves and edits are all there. It's a subset of full Vim, not the entire feature set, but it covers what you need for prompt editing."
What to show on screen: Start with Normal mode (prompt visible, cursor blinking), show hjkl navigation, then show insert/delete operations
4. How to Enable Vim Mode
- Via
/configmenu → Editor mode → select "Vim" - Via CLI:
claude config set editorMode vim - Via settings.json:
"editorMode": "vim" - Toggle on/off anytime; settings persist
What to say: "Enabling Vim mode is one click. And if you change your mind, it's one click to switch back to normal editing. There's no commitment—try it out."
What to show on screen: Navigate to /config, show the Editor mode selector, toggle Vim on, show the interface update
Demo Plan
- Setup (0:15) — Open Claude Code, navigate to
/configmenu - Show Editor Mode Selector (0:30) — Locate and show the Editor mode dropdown, highlight Vim option
- Enable Vim Mode (0:45) — Click to enable Vim mode, show confirmation
- Enter Insert Mode (1:00) — Type a prompt, press
ito ensure you're in insert mode, type some text - Switch to Normal Mode (1:30) — Press Esc, show that you're in Normal mode (cursor should change)
- Demo Navigation (1:45) — Use hjkl to move, show word jumping with w/b
- Demo Deletion and Copy (2:15) — Show dd (delete line), yy (copy), p (paste), u (undo)
- Multi-line Editing Example (2:45) — Edit a longer prompt using Vim commands, show speed
- Disable Vim Mode (3:30) — Show how to turn it off and revert to normal editing
- Wrap-up (4:00) — Summarize when Vim mode shines and best practices
Code Examples & Commands
Enable Vim mode via CLI:
claude config set editorMode vim
In settings.json:
{
"editorMode": "vim"
}
Common editing workflow in Vim mode:
# 1. Start typing in Insert mode
i
Here's my code: ...
<Esc> # back to Normal mode
# 2. Navigate to a line and delete it
dd
# 3. Navigate to a word and delete it
dw
# 4. Copy a line and paste it elsewhere
yy
# navigate to where you want it
p
# 5. Jump to the end of text and add more
G
i
# more text here
<Esc>
# 6. Undo if you make a mistake
u
Example: Rapid refinement of a multi-line prompt
# Original (many lines, needs editing)
:q # exit if needed
# In Vim mode
gg # go to beginning
3j # down 3 lines
dw # delete a word
w # move to next word
i # insert mode
new text here
<Esc> # back to normal
p # paste something
u # undo if wrong
Gotchas & Tips
-
Vim mode is a subset, not full Vim — Features like macros, marks, and regex substitution (
:s) may not be available. Stick to basic navigation and editing. -
Toggle mode confusion — The Esc key is essential. Forgetting to press Esc to exit Insert mode before using navigation keys is a common mistake.
-
No mouse while in Vim mode — The cursor is controlled by keyboard. If you need to click, you might need to exit Vim mode first or use keyboard-only navigation.
-
Muscle memory applies—but context matters — Your Vim habits transfer well, but this isn't full Vim. Test basic commands before relying on complex sequences.
-
Vim mode is UI/terminal independent — Enabling it in settings applies everywhere. If you don't want Vim mode, disable it globally rather than toggling it constantly.
-
:commands may be limited — Colon-style ex commands (like:wq,:q!) might not work the same. Use Escape and other normal-mode commands instead. -
Multi-line paste in Insert mode — Paste works as expected. Use
P(uppercase) to paste above the cursor,pto paste below. -
Line wrapping and display — Long lines might wrap visually, but they're still one line. hjkl moves by character/line, w/b by word.
Lead-out
"Vim mode is the cherry on top of fast, keyboard-driven editing. You've now seen the three core tools for advanced input: Extended Thinking for reasoning, multi-line input for clarity, and Vim mode for speed. Together, they transform how you work with Claude Code. In the next section, we'll dive into workflow optimization—taking everything you've learned and building it into a real, productive routine."
Reference URLs
Prep Reading
- Basic Vim keybindings and modal editing
- Differences between Vim and Vi
- Vim modes: Insert, Normal, Visual (if supported)
- How to exit Vim mode gracefully
Notes for Daniel: Go fast with the Vim demo—don't spend 30 seconds on every keystroke. The pacing should feel snappy and show competence. Emphasize that this is optional and only for people who already know Vim. If you're not comfortable with Vim yourself, record it carefully or practice beforehand. Avoid getting into advanced Vim concepts (macros, regex, etc.) that aren't supported. Keep it practical and relatable.