DELAPARRA
Index
Color
NL
Category: Keyboard shortcuts

Go to Definition

Explained by Updated

What is Go to Definition?

Go to Definition: Jump to where a symbol (function, class, variable) is defined. Core to reading unfamiliar code. Go to Definition jumps from where a function, class or variable is used to where it is defined. In VS Code press F12, or hold Ctrl or Cmd and click the name. JetBrains IDEs use Ctrl+B or Cmd+B.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Go to Definition

How is Go to Definition used in practice?

It is the most useful shortcut for reading code you did not write. Instead of searching through files, you follow the code the same way it runs, one call at a time.

What should you keep in mind with Go to Definition?

Its partners are just as useful. Go back, Alt+Left or Ctrl+-, returns to where you were. Find usages, Shift+F12 in VS Code or Alt+F7 in JetBrains, shows every place something is used, which is exactly what you need before changing or deleting it. These features rely on the editor understanding your code, so they work best with type hints and a properly configured project.

At a glance

CategoryKeyboard shortcuts
Explained by
Updated

More Keyboard shortcuts terms

All terms starting with G

Skills

Manuals

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.