TwitterGitHubFacebookLinkedIn
Zed Logo

Zed Shortcuts

Zed is my favorite editor. I use vim mode with Zed editor, it's super fast and efficient. Here are some of the Zed Commands and Zed Shortcuts that I use frequently to enhance my productivity.

You can read my blog post if you want to know why Zed is my primary editor.

Last updated on April 10, 2025

Navigation

Open Project Explorer
cmd+shift+e

You can navigate the project using vim keys(j, k, l, h)

NavigationUI & Window ManagementFile System Operations
Go to line number
:n

:10 will take you to line 10

Navigation
Editor
Scroll down half page
ctrl+d

Scrolls and moves the cursor

Navigation
Editor
AI Assistant
Scroll up half page
ctrl+u

Scrolls and moves the cursor

Navigation
Editor
AI Assistant
Open outline
cmd+shift+o
gs

View the structure of the current file

NavigationCode Intelligence
Editor
Search project files
cmd+p

Search for a file in the project

Navigation
Editor
Open Project Search
cmd+option+o

Open the project search UI to search for recently opened projects and open them in the current window(enter) or a new window (cmd+enter)

Navigation
Everywhere
End of line
$

Move the cursor to the end of the line

Navigation
Editor
AI Assistant
Go to top of file
gg

Move the cursor to the top of the file

Navigation
Editor
AI Assistant
File Explorer
Go to bottom of file
G
shiftg

Move the cursor to the bottom of the file

Navigation
Editor
AI Assistant
File Explorer

Editing

Rename variable/function
cd

Rename the variable or function under the cursor

EditingCode Intelligence
Editor
Undo
u

Undo the last change

Editing
Editor
AI Assistant
Redo
ctrl+r

Redo the last undone change. Opposite of undo.

Editing
Editor
AI Assistant
Insert at end of line
A

Move to end of line and enter edit mode

EditingNavigation
Editor
AI Assistant
Insert at start of line
I

Move to start of line and enter edit mode

EditingNavigation
Editor
AI Assistant
Insert at cursor
i

Enter edit mode at the current cursor position

Editing
Editor
AI Assistant
Add line below
o

Add a new line below the current line

Editing
Editor
AI Assistant
Add line above
O

Add a new line above the current line

Editing
Editor
AI Assistant
Toggle code fold
za

Close or open a code fold

Editing
Open all folds in the file
zR

This opens all the folds in the file

Editing
Close all folds in the file
zM

Very useful when you want to have a quick overview of the file

Editing

UI & Window Management

Toggle right sidebar
cmd+r

I usually keep everything on the right

UI & Window ManagementNavigation
Everywhere
Enter zen mode
shift+esc

Enter fullscreen mode, this works for files, terminal, AI assistant and Git text input

UI & Window Management
Editor
Terminal
AI Assistant
Git

Code Intelligence

Open Assistant Panel
cmd+shift+?

Open the assistant panel to chat with the assistant

Code IntelligenceUI & Window ManagementNavigationAI Assistant
Hover
gh

Hover over a word to see its definition

Code Intelligence
Editor
Go to definition
gd

Jump to the definition of the word under the cursor

Code IntelligenceNavigation
Editor
Jump to next diagnostic
g]

Quicky loop through errors

Code IntelligenceNavigation
Editor
Jump to previous diagnostic
g[

Quicky loop through errors

Code IntelligenceNavigation
Editor

Terminal

Add a new terminal
ctrl+shift+~

Add a new terminal to the terminal panel

Terminal
Toggle terminal panel
cmd+j

To toggle the terminal panel

TerminalUI & Window ManagementNavigation

Git & Version Control

toggle git panel
ctrl+shift+g

You can use vim navigation keys to navigate through the git panel

Git & Version ControlUI & Window ManagementNavigation
Generate commit message
option+tab

When focused on commit message in Git Panel, let AI generate a commit message

Git & Version ControlAI Assistant
Git
git fetch
ctrl+gctrl+g

fetch changes from remote

Git & Version Control
git pull
ctrl+gdown

pull changes from remote

Git & Version Control
git push
ctrl+gup

push changes to remote

Git & Version Control
git push --force
ctrl+gshift+up

forcepush changes to remote

Git & Version Control
git diff
ctrl+gd

show all changes

Git & Version Control
git add --all
ctrl+cmd+y

stage all changes

Git & Version Control
git add --all
shift+x

stage all changes

Git & Version Control
unstage all changes
shift+u

unstage all changes

Git & Version Control

AI Assistant

Inline AI Assistant
ctrl+enter

Generate code suggestions inline, it works even in Assistant panel and Terminal

AI AssistantTerminal
Editor
Terminal
AI Assistant
Chat with Assistant
ctrl+enter

Send message to the assistant

AI Assistant
AI Assistant
Suggest Edits
cmd+shift+enter

AI will suggest edits to your code. You must have at least one file attached for it to work.

AI Assistant
AI Assistant

File System Operations

Run a task
cmd+shift+r

Define tasks in .zed/tasks.json

File System Operations
Show file in finder
x

When focus is on the project, show the file in finder

File System Operations
File Explorer