Go to a specific line in the Source view

Use this task when you already know the line number of interest—for example, from a build log, error message, or code review comment—and you want to jump directly to that location in the current source file without scrolling.

  1. Click in the Source view and do one of the following: 

    • On the menu bar, click Edit > Go to line.

    • Press Ctrl+G (Windows and Linux) or Command+G (macOS).

    The Go to line panel appears in the Source view.

  2. In the Go to line panel, type the line number you want to inspect. As you type, the Source view scrolls to and highlights the corresponding line location so you can preview the destination.

    Screenshot demonstrating the Go to line panel in the Source view

  3. Confirm or cancel the navigation, as follows:

    • To navigate to the line, press the Enter (Return) key.

    • To cancel the navigation and return to the previously selected line, press the Esc key or click Close Source view Find panel's Close button at the right end of the panel.

The Go to line action is limited to the currently active file in the Source view. If you need to navigate to a line in a different file, first open that file or select it from the Documents view.