Navigation in Zed
Move through your code and projects with speed and precision
Efficient Navigation Principles
Fast, precise navigation is one of Zed's core strengths. Zed combines traditional navigation with innovative approaches to help you move through your code effortlessly:
- Speed: Navigate instantly with minimal latency
- Context awareness: Jump between logically related code
- Search-driven: Find anything with a few keystrokes
- Memory: Navigate back and forth through your history
Most developers spend more time navigating code than writing it. Mastering navigation in Zed will dramatically boost your productivity.
File Navigation
Fuzzy File Finder
The quickest way to open files is with the fuzzy file finder:
- Press ⌘P to open the file finder
- Type part of the filename to filter results
- Results update instantly as you type
- Use arrow keys to navigate results and Enter to open a file
The fuzzy finder prioritizes matches based on your typing pattern. For example, typing "mdl" might match "model.js" even though letters are skipped.
Recently Opened Files
Quick access to recently opened files:
- Press ⌘ShiftE to show recently opened files
- Use ⌘Tab to cycle through open editors
Project Panel Navigation
Navigate using the project panel:
- Press ⌘1 to focus the project panel
- Use arrow keys to navigate the file tree
- Press Enter to open a file
- Use Space to preview a file without switching focus
Code Navigation
Basic Movement
- Line Navigation: Home/End to jump to start/end of line
- Word Navigation: ⌥←/⌥→ to move by word
- Page Navigation: Page Up/Page Down to scroll up/down
- File Navigation: ⌘Home/⌘End to go to start/end of file
Symbol Navigation
Navigate through code structures:
- Go to Symbol: ⌘ShiftO to search for symbols in the current file
- Go to Symbol in Workspace: ⌘T to search for symbols across your project
- Go to Definition: F12 or ⌘Click on a symbol
- Find References: ShiftF12 to find all usages of a symbol
- Peek Definition: ⌥F12 to preview a definition without leaving current file
Symbol navigation is powered by Zed's language servers, which parse and index your codebase to provide semantic understanding.
Smart Navigation
Jump to Line
- Press ⌘G to open the go to line dialog
- Enter the line number and press Enter
Bracket Matching
- Press ⌘Shift\\ to jump to the matching bracket
Problem Navigation
- Next Problem: F8 to jump to the next error or warning
- Previous Problem: ShiftF8 to jump to the previous error or warning
Navigation History
Zed keeps track of your navigation positions:
- Go Back: ⌘[ or ⌃- to navigate to previous position
- Go Forward: ⌘] or ⌃Shift- to navigate to next position
Search-Based Navigation
Find in File
- Press ⌘F to search within the current file
- Press F3 to find the next occurrence
- Press ShiftF3 to find the previous occurrence
Find in Project
- Press ⌘ShiftF to search across all files
- Results appear in a searchable panel
- Click on results to jump to matching locations
Use regular expressions in your search by toggling the regex option in the search panel. This enables powerful pattern matching across your codebase.
Multi-File Navigation
Split Editors
Navigate between multiple editor panes:
- Create Vertical Split: ⌘\\
- Create Horizontal Split: ⌘Shift\\
- Focus Next Editor: ⌘Shift`
Tab Navigation
- Next Tab: ⌘Shift] to go to the next tab
- Previous Tab: ⌘Shift[ to go to the previous tab
- Go to Tab: ⌘1 through ⌘9 to jump to specific tabs
Navigation Workflow Examples
Example 1: Finding a Function Implementation
-
Find the function call
Use ⌘ShiftF to search for the function name in your project.
-
Jump to the definition
Position cursor on the function and press F12 to go to the definition.
-
Return when finished
Press ⌘[ to return to the original position.
Example 2: Exploring an Unfamiliar Codebase
-
Start with entry points
Open main files (index.js, main.py, etc.) using ⌘P.
-
View file symbols
Press ⌘ShiftO to see the structure of each file.
-
Search for key concepts
Use ⌘ShiftF to find important terms across the project.
Create a split view with ⌘\\ to keep reference files visible while navigating related code in another pane.
What's Next?
Now that you've mastered navigation in Zed, you're ready to learn how to collaborate with others in real-time, one of Zed's most powerful features.