Skip to content

Zed: Vim Mode Cheatsheet

Essential Vim keybindings and workflows for Zed editor on Linux.

Enabling Vim Mode

Add to ~/.config/zed/settings.json:

json
{
  "vim_mode": true
}

Or toggle via command palette: Ctrl+Shift+P → "Toggle Vim Mode".

Modes

KeyAction
EscReturn to Normal mode
iInsert before cursor
aInsert after cursor
IInsert at beginning of line
AInsert at end of line
oOpen new line below
OOpen new line above
vVisual (character) mode
VVisual Line mode
Ctrl+VVisual Block mode

Basic Motions

KeyAction
h / lMove left / right
j / kMove down / up
wJump to next word start
bJump to previous word start
eJump to end of word
0Jump to beginning of line
$Jump to end of line
^Jump to first non-blank character
ggJump to top of file
GJump to bottom of file
{ / }Jump to previous / next paragraph
Ctrl+DScroll half page down
Ctrl+UScroll half page up
%Jump to matching bracket
:<number>Go to line number

Editing

KeyAction
xDelete character under cursor
ddDelete entire line
dwDelete word
d$ or DDelete to end of line
ccChange entire line
cwChange word
c$ or CChange to end of line
yyYank (copy) line
ywYank word
pPaste after cursor
PPaste before cursor
uUndo
Ctrl+RRedo
.Repeat last change
>> / <<Indent / unindent line
~Toggle case

Search & Replace (In-Editor)

KeyAction
/patternSearch forward
?patternSearch backward
nNext match
NPrevious match
*Search word under cursor (forward)
#Search word under cursor (backward)

Text Objects

Use with operators like d, c, y (e.g., di" deletes inside quotes).

KeyAction
iw / awInner word / a word (with space)
i" / a"Inside double quotes / around quotes
i' / a'Inside single quotes / around quotes
i( / a(Inside parentheses / around parens
i{ / a{Inside braces / around braces
i[ / a[Inside brackets / around brackets
it / atInside HTML tag / around tag

Surround (Built-in)

Zed includes vim-surround support out of the box.

KeyAction
ys<motion><char>Add surround (e.g., ysiw" surrounds word with quotes)
ds<char>Delete surround (e.g., ds" removes surrounding quotes)
cs<old><new>Change surround (e.g., cs"' changes " to ')

File Search & Navigation

KeyAction
Ctrl+POpen file finder (fuzzy search by filename)
Ctrl+Shift+FSearch across entire project (grep)
Ctrl+Shift+PCommand palette
Ctrl+GGo to line
Ctrl+Shift+OGo to symbol in file
gdGo to definition (Vim motion)
grGo to references
Ctrl+Shift+EFocus file explorer / project panel
Ctrl+-Navigate back
Ctrl+Shift+-Navigate forward

Project Panel (File Explorer)

Toggle with Ctrl+Shift+E or click the file icon in the sidebar.

KeyAction
j / kMove down / up in file list
EnterOpen file or expand folder
aAdd new file
AAdd new directory
rRename file or folder
dDelete file or folder
Ctrl+Shift+EToggle project panel focus

Terminal

KeyAction
Ctrl+`Toggle terminal panel
Ctrl+Shift+`Open new terminal
Ctrl+Shift+EFocus back to editor from terminal
Ctrl+`Focus back to terminal from editor

When the terminal is focused, normal typing goes to the shell. Press Ctrl+` to switch back to the editor.

Splits & Panes

KeyAction
Ctrl+\Split editor right
Ctrl+K then Ctrl+\Split editor down
Ctrl+K then Ctrl+LeftFocus pane to the left
Ctrl+K then Ctrl+RightFocus pane to the right
Ctrl+K then Ctrl+UpFocus pane above
Ctrl+K then Ctrl+DownFocus pane below
Ctrl+W then Ctrl+WCycle through panes

Tabs

KeyAction
Ctrl+TabNext tab
Ctrl+Shift+TabPrevious tab
Ctrl+WClose current tab
Ctrl+1 to Ctrl+9Switch to tab by number
Ctrl+Shift+TReopen last closed tab
gtNext tab (Vim)
gTPrevious tab (Vim)

Multi-Cursor

KeyAction
Ctrl+DSelect next occurrence of word (add cursor)
Ctrl+Shift+LSelect all occurrences of word
gbAdd cursor at next occurrence (Vim)
Ctrl+Alt+UpAdd cursor above
Ctrl+Alt+DownAdd cursor below

Useful Combos

ActionKeys
Delete a word and type replacementciw then type new word
Delete inside quotes and retypeci" then type new text
Select a function body and deletevi{d
Indent a blockV select lines, then >
Comment/uncomment linesgcc (single line) or gc in visual mode
Duplicate lineyyp
Move line downddp
Move line upddkP
Search and open a fileCtrl+P, type filename, Enter
Jump to definition and come backgd to go, Ctrl+- to come back

Released under the MIT License.