Go to Line
What is Go to Line?
Go to Line: Jump straight to a line number. Useful when a stack trace or a colleague points you at "line 142". Go to Line jumps straight to a line number. In VS Code press Ctrl+G, in JetBrains IDEs Ctrl+G or Cmd+L, and in Vim type the number followed by G. It is the quickest way to follow a stack trace, a linter warning or a colleague who says "look at line 142". Many editors also accept line:column to land on the exact character.
Frequently asked questions about Go to Line
What should you keep in mind with Go to Line?
When an error log contains a file path and line number, most terminals and IDEs can make that clickable. Clicking it opens the file at the right spot, which is even faster. Line numbers change as code is edited, so for code reviews and documentation, link to a specific commit on GitHub or GitLab. That link keeps pointing to the right line even after the file changes.
At a glance
| Category | Keyboard shortcuts |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |