Zed's vim mode with AI: keyboard-driven coding without giving up the assistant
Published 2026-04-09 by Owner
I’ve used vim emulators in VS Code, Cursor, and JetBrains for the past decade. They’re all “okay.” Zed’s vim mode is the first one that feels like vim, not “vim shaped object built on top of a non-vim editor.” Combined with Zed’s AI panel, the result is the fastest AI-assisted coding I’ve done.
Why most vim emulators feel wrong
VS Code’s vim plugin (vim-vscode) is functional but uneven. Some commands work; some don’t; some have subtle differences. Macros are unreliable. The text object support is partial. The result: you can use it, but you’re constantly switching between vim mode and “the way the editor wants to do it.”
Cursor inherits this from VS Code. JetBrains’ IdeaVim is better but heavy.
Zed’s vim mode is built into the editor, not bolted on. The motions feel native. Macros work. Visual mode behaves the way vim users expect. The text objects I rely on (vab, vat, caw) all work consistently.
This sounds like a small detail. For someone who lives in vim, it’s the difference between “I tolerate the editor” and “I’m not aware the editor is in my way.”
The AI integration that doesn’t break the flow
Zed’s AI panel sits to the side. It opens with cmd-? (or whatever you bind it to). Within the panel, you type prompts; the model responds with text and code suggestions. You can apply suggestions to the editor with a keyboard shortcut.
What this preserves: my hands stay on the keyboard. To ask the model something, I hit cmd-?, type, hit enter, read the response, hit a shortcut to apply or copy. No mouse.
What VS Code/Cursor mostly require: clicking on the chat panel, clicking apply buttons, clicking accept/reject. The vim mode helps with editing but the AI integration is mouse-shaped.
Slash commands as keyboard primitives
Zed’s AI panel supports slash commands that grab context. /file path/to/file.ts adds a file to the conversation. /diagnostics adds the current file’s errors. /symbol functionName adds a specific function.
These are typed, not clicked. The flow feels like:
cmd-? # open AI panel
/file src/auth.ts # add a specific file
explain how this handles refresh tokens
enter
In Cursor, the equivalent flow involves clicking the @ mention, typing, selecting from a dropdown, then typing the question. It’s the same operation, but every click breaks the keyboard flow.
For someone who’s optimized their typing for vim and is bothered by mouse trips, this difference compounds across a day.
A specific workflow
A task I do regularly: investigate why a function is behaving wrong, propose a fix.
In Zed with vim + AI:
gd # jump to definition
cmd-? # open AI panel
/symbol parseUserInput
why is this returning undefined when input has multiline content?
enter
# read response, decide on approach
cmd-? # back to panel
/diagnostics
let's fix it. write a patch that handles \n correctly. show me the diff.
enter
# apply the diff
cmd-a # accept all
:w # save
Total time: maybe 90 seconds. No mouse touches.
The same flow in Cursor takes maybe 3-4 minutes because of the click-pattern interruptions. Not because the AI is slower — because the editor is slower around the AI.
Vim text objects + AI selection
The integration that makes vim and AI fit well: text objects.
When I want to ask the AI about a specific function, I don’t have to click and drag to select. I do vaf (visual around function) and the function is selected. Then cmd-? opens the AI panel with the selection as context.
Same for “ask about this paragraph in markdown” (vap), “ask about this argument” (vaa), “ask about this block” (vab).
Zed’s AI panel knows about the editor’s selection. When you open it with text selected, the selection is the implicit context. You don’t have to copy/paste.
Macros for repetitive AI workflows
A pattern I use: write a quick macro that runs the same AI prompt across multiple selections. For example, “for each function in this file, add a docstring.”
qa # start recording macro into register a
vaf # select function
cmd-? # open AI
:add a JSDoc comment to this function explaining inputs and return value
enter
cmd-a # accept
]m # jump to next function
q # stop recording
Then 100@a runs the macro 100 times (or until it errors). I’ve used this for batch operations: adding tests, adding logging, applying a refactor pattern.
This is meaningful productivity. The same operation in Cursor would require manually invoking the AI for each function, which most people give up on after 3-4 functions.
Where it breaks down
Zed vim is good but not perfect. Things that still bug me:
:command-mode autocomplete. Some of vim’s :command patterns aren’t supported (:tabn, custom commands). I’ve adapted but it’s a gap.
Surround plugin. Vim’s surround.vim (the cs"'-style commands for changing surrounds) isn’t built in. Zed has its own version that mostly works but has a different mental model.
Line numbers in normal mode. Working fine until you change colorschemes; some themes break the relative line number rendering.
Quickfix list. Vim’s quickfix list is a useful navigation primitive. Zed’s diagnostics panel approximates it but isn’t 1:1.
For my use, these are small enough to ignore. For deep vim users with custom configs, the gap may matter more.
Why the combination matters
Vim alone gets you fast text editing. AI alone gets you faster reasoning about code. The combination is more than the sum because both reduce the cost of “trying things.”
In a non-vim editor without AI, trying an alternative implementation costs minutes. With AI, the cost drops to seconds. With vim + AI, the cost is sub-second — you can rough out an alternative, run the AI on it for review, accept or revert, and you’ve spent ten seconds total.
That’s the productivity I haven’t found in any other AI-assisted editor. JetBrains has good vim but the AI integration is bolted on. VS Code has good AI integration but the vim plugin is uneven. Zed gets both right.
For developers who care about both, it’s worth a serious trial. For developers who don’t use vim, the editor is still solid but you’re missing the differentiator.