vscode usage tips

December 25, 2025

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.

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, or last
  • breadcrumbs.symbolPath: on, off, or last
  • breadcrumbs.symbolSortOrder: position, name, or type

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

ActionMacWindows/Linux
Quick OpenCmd+PCtrl+P
Go to DefinitionF12F12
Go to ImplementationCmd+F12Ctrl+F12
Go to Symbol in FileShift+Cmd+OCtrl+Shift+O
Go to Symbol in WorkspaceCmd+TCtrl+T
Peek ReferencesShift+F12Shift+F12
Peek DefinitionOption+F12Alt+F12
Jump to Matching BracketShift+Cmd+\Ctrl+Shift+\
Rename SymbolF2F2
Open Problems PanelShift+Cmd+MCtrl+Shift+M
Next Error/WarningOption+F8Alt+F8
Focus BreadcrumbsShift+Cmd+.Ctrl+Shift+.
Navigate BackCtrl+-Ctrl+-
Navigate ForwardCtrl+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:

  1. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Run Extensions: Disable All Installed Extensions
  3. Restart VS Code and test
  4. 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.

© 2025 borui. All rights reserved. This content may be freely reproduced, displayed, modified, or distributed with proper attribution to borui and a link to the article: borui (2025-12-25). vscode usage tips. https://caiborui.com/blog/2025-12-25-en-vscode-usage-tips

@misc{borui2025-db292bc4,
  author = {borui},
  title = {{vscode usage tips}},
  year = {2025},
  publisher = {borui's blog},
  url = {https://caiborui.com/blog/2025-12-25-en-vscode-usage-tips}
}