shortcutsguide

Go To Line Shortcut (⌃G / Ctrl+G)

Jump straight to any line number: press Ctrl+G on Windows or ⌃G on Mac in VS Code, type the number, and press Enter.

ActionMacWindows
Go to line (VS Code) ⌃G Ctrl+G
Go to line + column ⌃G then line:col Ctrl+G then line:col
Go to line (Sublime Text) ⌃G Ctrl+G
Go to line (JetBrains) ⌘L Ctrl+G
Go to file (quick open) ⌘P Ctrl+P

Jump to a line number

In VS Code, press Ctrl+G (Windows/Linux) or ⌃G (Mac), type the line number, and hit Enter. Add a colon and a column — like 120:8 — to land on an exact character. This is the fastest way to follow a stack trace or a compiler error that reports a line number. To scroll one full screen at a time instead of jumping to a number, use the Page Down shortcut.

Other editors

Sublime Text: Ctrl+G / ⌃G. JetBrains IDEs: Ctrl+G on Windows but ⌘L on Mac. In every editor you can also open a file directly with quick-open (Ctrl+P / ⌘P) and append :line.

Troubleshooting

In VS Code, Ctrl+G only opens the Go-to-Line box when the editor is focused — if you are in the terminal or a panel, click into the code first. On Mac remember it is Control+G, not ⌘G (which is Find Next).

FAQ

How do I go to a specific line in VS Code?

Press Ctrl+G (Windows/Linux) or ⌃G (Mac), type the line number, and press Enter. Add :column to jump to an exact character.

What is go to line in JetBrains IDEs?

Ctrl+G on Windows/Linux, ⌘L on Mac opens the line-number navigator.

Can I jump to a line and column at once?

Yes — in the Go-to-Line box type line:column, for example 120:8, then press Enter.

Why doesn't Ctrl+G work?

On Mac the shortcut is Control+G, not ⌘G (which is Find Next). Also make sure the code editor, not the terminal panel, is focused.