A comprehensive guide to keyboard shortcuts and best practices for efficient coding with Zed editor.
Zed is a high-performance code editor built in Rust, designed for speed and minimalism. Key advantages:
Note: Shortcuts shown for Linux/Windows. On macOS, replace
CtrlwithCmdandAltwithOption.
| Shortcut | Action |
|---|---|
Ctrl+Shift+P |
Command Palette (access any command) |
Ctrl+, |
Open Settings |
Ctrl+Shift+X |
Extensions Store |
Ctrl+Q |
Quit Zed |
| Shortcut | Action |
|---|---|
Ctrl+N |
New file |
Ctrl+Shift+N |
New window |
Ctrl+O |
Open folder |
Ctrl+S |
Save |
Ctrl+Shift+S |
Save As |
Ctrl+Alt+S |
Save All |
Ctrl+W |
Close tab |
Ctrl+Shift+W |
Close window |
| Shortcut | Action |
|---|---|
Ctrl+P / Ctrl+E |
Quick file open (fuzzy finder) |
Ctrl+G |
Go to line/column |
Ctrl+Shift+O |
Go to symbol in file |
F12 |
Go to definition |
Ctrl+F12 |
Go to type definition |
Alt+Shift+F12 |
Find all references |
Ctrl+Alt+- |
Navigate back |
Ctrl+Alt+Right/Left |
Navigate between tabs |
F8 / Shift+F8 |
Next/Previous problem |
| Shortcut | Action |
|---|---|
Ctrl+F |
Find in file |
Ctrl+H |
Find and replace |
Ctrl+Shift+F |
Find in project (global search) |
Ctrl+Shift+H |
Replace in project |
| Shortcut | Action |
|---|---|
Ctrl+Z |
Undo |
Ctrl+Shift+Z |
Redo |
Ctrl+X |
Cut line (no selection) / Cut selection |
Ctrl+C |
Copy line (no selection) / Copy selection |
Ctrl+V |
Paste |
Ctrl+/ |
Toggle line comment |
Ctrl+Shift+D |
Duplicate line/selection |
Alt+Up/Down |
Move line up/down |
Ctrl+Shift+K |
Delete line |
Ctrl+Enter |
Insert line below |
Ctrl+Shift+Enter |
Insert line above |
| Shortcut | Action |
|---|---|
Ctrl+A |
Select all |
Alt+Shift+Up/Down |
Add cursor above/below |
Ctrl+D |
Select word / Select next occurrence |
Ctrl+Shift+L |
Select all occurrences |
Alt+Shift+Right/Left |
Expand/Shrink selection |
Ctrl+L |
Select entire line |
| Shortcut | Action |
|---|---|
Ctrl+B |
Toggle left dock (file explorer) |
Ctrl+Alt+B |
Toggle right dock |
Ctrl+J |
Toggle bottom dock (terminal) |
Ctrl+Alt+Y |
Close all docks |
Ctrl+Shift+E |
Project panel |
Ctrl+Shift+B |
Outline panel |
Ctrl+\` |
Terminal panel |
Ctrl+Shift+M |
Diagnostics panel |
| Shortcut | Action |
|---|---|
Ctrl+K then Up |
Split up |
Ctrl+K then Down |
Split down |
Ctrl+K then Left |
Split left |
Ctrl+K then Right |
Split right |
Ctrl+1/2/3... |
Focus pane by number |
| Shortcut | Action |
|---|---|
Ctrl+\` |
Toggle terminal |
Ctrl+Shift+\` |
New terminal instance |
| Shortcut | Action |
|---|---|
Ctrl+Shift+G |
Toggle Git panel |
Ctrl+G Ctrl+G |
Git fetch |
Ctrl+G Down |
Git pull |
Ctrl+G Up |
Git push |
Ctrl+G D |
Git diff |
| Shortcut | Action |
|---|---|
Ctrl+Shift+? |
Open AI Assistant panel |
Ctrl+Alt+N |
New text thread |
Ctrl+Alt+T |
New chat thread |
Ctrl+I |
Agent profile menu |
Ctrl+Alt+/ |
Model selection |
Ctrl+Enter |
Send prompt / Inline AI |
Ctrl+Shift+Enter |
Suggest edits |
| Shortcut | Action |
|---|---|
Ctrl+Shift+[ |
Fold code block |
Ctrl+Shift+] |
Unfold code block |
Ctrl+K Ctrl+0 |
Fold all |
Ctrl+K Ctrl+J |
Unfold all |
Enable Vim mode in settings ("vim_mode": true) for these additional shortcuts:
| Shortcut | Action |
|---|---|
h/j/k/l |
Left/Down/Up/Right |
w/b |
Word forward/backward |
e |
End of word |
0 / $ |
Start/End of line |
gg / G |
Start/End of file |
Ctrl+D/U |
Half page down/up |
:n (e.g., :10) |
Go to line n |
| Shortcut | Action |
|---|---|
i / a |
Insert before/after cursor |
I / A |
Insert at start/end of line |
o / O |
New line below/above |
u |
Undo |
Ctrl+R |
Redo |
dd |
Delete line |
yy |
Yank (copy) line |
p / P |
Paste after/before |
cc |
Change line |
ciw |
Change inner word |
| Shortcut | Action |
|---|---|
gd |
Go to definition |
gh |
Hover (show definition) |
g] / g[ |
Next/Previous diagnostic |
za |
Toggle code fold |
zR / zM |
Open/Close all folds |
cd |
Rename symbol |
The Command Palette (Ctrl+Shift+P) is your gateway to everything:
Tip: Start typing any action name - Zed uses fuzzy matching.
Press Ctrl+P to open files instantly:
usrcnt matches UserControllersrc/comp/btn finds src/components/Button.tsxNavigate code structures efficiently:
Ctrl+Shift+O - Jump to functions, classes, methods in current fileF12 - Go to definition under cursorAlt+Shift+F12 - Find all references (great for refactoring)Edit multiple locations simultaneously:
Ctrl+D - Select word, press again to select next occurrenceCtrl+Shift+L - Select ALL occurrences at onceAlt+Shift+Up/Down - Add cursors verticallyUse case: Rename a variable in multiple places instantly.
Keep your workspace clean:
Ctrl+B - Toggle file explorer only when neededCtrl+J - Toggle terminalCtrl+Alt+Y - Close all panels for full-screen editingCtrl+K + direction) for side-by-side editingUse built-in Git features:
Ctrl+Shift+G - Open Git panelAlt+Tab in Git panel)Maximize AI productivity:
Ctrl+Shift+? - Open AI assistant for questionsCtrl+Enter - Inline AI for quick completionsWhen working with large files:
Ctrl+K Ctrl+0 - Fold all to see structureCtrl+Shift+B - Use Outline panel for navigationDefine custom tasks in .zed/tasks.json:
[
{
"label": "Run Tests",
"command": "npm test",
"args": [],
"use_new_terminal": true
}
]
Run with Ctrl+Shift+R to execute tasks without typing commands.
Edit settings (Ctrl+,) for your workflow:
{
"theme": "One Dark",
"vim_mode": true,
"relative_line_numbers": true,
"tab_size": 2,
"format_on_save": "on",
"autosave": "on_focus_change",
"soft_wrap": "editor_width"
}
Create .zed/settings.json in your project root for:
Minimize mouse usage:
Ctrl+PCtrl+G (go to line) and symbol searchAccess via Ctrl+Alt+, or Command Palette > “Open Settings (JSON)”:
{
"theme": "One Dark",
"buffer_font_family": "JetBrains Mono",
"buffer_font_size": 14,
"ui_font_size": 14,
"vim_mode": true,
"relative_line_numbers": true,
"tab_size": 2,
"soft_wrap": "editor_width",
"show_whitespaces": "boundary",
"autosave": {
"after_delay": {
"milliseconds": 1000
}
},
"format_on_save": "on",
"terminal": {
"font_family": "JetBrains Mono",
"font_size": 13
},
"git": {
"inline_blame": {
"enabled": true
}
},
"assistant": {
"default_model": {
"provider": "anthropic",
"model": "claude-sonnet-4-5-20250929"
}
}
}
Customize shortcuts via Ctrl+Shift+P > “Open Keymap”:
[
{
"context": "Editor",
"bindings": {
"ctrl-shift-d": "editor::DuplicateLine",
"ctrl-shift-k": "editor::DeleteLine"
}
}
]
| Action | Shortcut |
|——–|———-|
| Command Palette | Ctrl+Shift+P |
| Quick Open File | Ctrl+P |
| Find in Project | Ctrl+Shift+F |
| Go to Definition | F12 |
| Toggle Terminal | Ctrl+\ |
| Toggle Comment | Ctrl+/ |
| Select Next Occurrence | Ctrl+D |
| Move Line | Alt+Up/Down |
| Duplicate Line | Ctrl+Shift+D |
| Save | Ctrl+S` |
Ctrl+P -> Open file
Ctrl+Shift+O -> Jump to symbol
Ctrl+G -> Go to line
F12 -> Go to definition
Ctrl+Alt+- -> Go back
Ctrl+D -> Select word
Ctrl+D (repeat) -> Select next occurrences
Edit all -> Type once, update everywhere
Ctrl+Shift+Z -> Redo if needed
Shortcuts not working?
Vim mode issues?
"vim_mode": true in settings: in Vim mode for command entryPerformance issues?
Last updated: November 2025