Go to Definition in VS Code (macOS)
Press F12 to jump to the place where the symbol under the cursor is defined.
What it does
With the cursor on a function, a class or a variable, Go to Definition opens the file where that symbol is defined and puts the cursor on it. It needs language support for the file type, which is built in for JavaScript and TypeScript and comes from an extension for most other languages. Go Back returns you to the line you came from.
More VS Code shortcuts: General
- Go to Matching Bracket
- Close window/instance
- User Settings
- Command Palette
- Quick Open File
All 71 VS Code shortcuts for macOSThe full list has a search and a printable PDF.
Questions
What is the VS Code shortcut for Go to Definition on macOS?
F12. Press it to jump to the place where the symbol under the cursor is defined.