Code Navigation
Quick File Navigation
Press Cmd+P (Mac) or Ctrl+P (Windows/Linux) to open Quick Open and jump to any file by typing its name.
Hold Ctrl and press Tab to view all open files in the current editor group. Use Tab to select and release Ctrl to open.
Use Ctrl+- and Ctrl+Shift+- to navigate back and forward between edit locations.
Breadcrumbs
The navigation bar above the editor shows your current location (folder > file > symbol). Click any breadcrumb to see siblings at that level.
Toggle with View > Show Breadcrumbs or set breadcrumbs.enabled.
Customize what's shown:
breadcrumbs.filePath:on,off, orlastbreadcrumbs.symbolPath:on,off, orlastbreadcrumbs.symbolSortOrder:position,name, ortype
Keyboard: Shift+Cmd+. to focus breadcrumbs and open dropdown, Shift+Cmd+; to focus without dropdown.
Go to Definition
Press F12 to jump to where a symbol is defined.
Ctrl+Click (or Cmd+Click on Mac) on a symbol to go to its definition.
Ctrl+Alt+Click opens the definition in a side editor.
Hover with Ctrl held to preview the definition inline.
Tip: Cmd/Ctrl + Click not working? The most common reason is not having the language extension installed. For example, install "Python" extension for Python files, "Go" for Go files, etc. See Troubleshooting Cmd/Ctrl + Click for other possible reasons.
Go to Type Definition
Run Go to Type Definition from the Command Palette or context menu to jump to the type definition of a symbol (not bound to a key by default).
Go to Implementation
Press Cmd+F12 (Mac) or Ctrl+F12 (Windows/Linux) to jump to implementations. For interfaces, this shows all implementors; for abstract methods, shows concrete implementations.
Go to Symbol
Shift+Cmd+O (Mac) or Ctrl+Shift+O (Windows/Linux) to navigate symbols in the current file. Type : to group by category.
Cmd+T (Mac) or Ctrl+T (Windows/Linux) to search symbols across all files in the workspace.
Peek
Shift+F12 - Peek References: shows all references inline without leaving your current location.
Alt+F12 (or Option+F12 on Mac) - Peek Definition: shows definition inline.
You can edit directly in the peek window. Double-click a result to open it in the main editor.
Press Escape to close the peek window.
Bracket Matching
Cursor near a bracket highlights the matching bracket automatically.
Shift+Cmd+\ (Mac) or Ctrl+Shift+\ (Windows/Linux) to jump to the matching bracket.
Enable bracket pair colorization: set editor.bracketPairColorization.enabled to true.
Customize colors in settings:
"workbench.colorCustomizations": {
"editorBracketHighlight.foreground1": "#FFD700",
"editorBracketHighlight.foreground2": "#DA70D6",
"editorBracketHighlight.foreground3": "#179fff"
}
Rename Symbol
Press F2 to rename a symbol across all files. Type the new name and press Enter.
Errors and Warnings
Shift+Cmd+M (Mac) or Ctrl+Shift+M (Windows/Linux) opens the Problems panel.
Alt+F8 (or Option+F8 on Mac) cycles through errors/warnings in the current file with inline details and quick fix suggestions.
Inlay Hints
Inlay hints show inferred types and other info inline. Control with editor.inlayHints.enabled.
Requires language extensions (TypeScript, Rust, etc.) to provide the hints.
Keyboard Shortcuts Summary
| Action | Mac | Windows/Linux |
|---|---|---|
| Quick Open | Cmd+P | Ctrl+P |
| Go to Definition | F12 | F12 |
| Go to Implementation | Cmd+F12 | Ctrl+F12 |
| Go to Symbol in File | Shift+Cmd+O | Ctrl+Shift+O |
| Go to Symbol in Workspace | Cmd+T | Ctrl+T |
| Peek References | Shift+F12 | Shift+F12 |
| Peek Definition | Option+F12 | Alt+F12 |
| Jump to Matching Bracket | Shift+Cmd+\ | Ctrl+Shift+\ |
| Rename Symbol | F2 | F2 |
| Open Problems Panel | Shift+Cmd+M | Ctrl+Shift+M |
| Next Error/Warning | Option+F8 | Alt+F8 |
| Focus Breadcrumbs | Shift+Cmd+. | Ctrl+Shift+. |
| Navigate Back | Ctrl+- | Ctrl+- |
| Navigate Forward | Ctrl+Shift+- | Ctrl+Shift+- |
Troubleshooting Cmd/Ctrl + Click
If Cmd+Click (Mac) or Ctrl+Click (Windows/Linux) is not working for "Go to Definition" or "Open Link", here are possible causes and fixes:
1. Missing Language Extension (Most Common)
The "Go to Definition" feature requires a language-specific extension. Make sure you have the relevant extension installed:
- Python files: Install "Python" extension
- Go files: Install "Go" extension
- TypeScript/JavaScript: Built-in, but check it's enabled
- C#: Install "C# Dev Kit" extension
2. Multi-Cursor Modifier Conflict
The Cmd/Ctrl key might be set for multi-cursor instead of navigation.
Open settings.json and ensure:
"editor.multiCursorModifier": "alt"
This frees up Cmd/Ctrl+Click for navigation and uses Alt/Option+Click for multi-cursor.
3. Extension Conflicts
A faulty extension may interfere with the shortcut:
- Open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Run Extensions: Disable All Installed Extensions
- Restart VS Code and test
- Re-enable extensions one by one to find the culprit
4. Project-Specific Settings
Check if .vscode/settings.json in your project has conflicting settings. Delete or modify it if needed.
5. System-Level Shortcut Conflict
On macOS, check System Settings > Keyboard > Keyboard Shortcuts for apps that might be capturing Cmd+Click globally.
6. Debug with Keyboard Shortcuts Troubleshooting
Open Command Palette and run Developer: Toggle Keyboard Shortcuts Troubleshooting. This logs what command VS Code registers when you press the shortcut.