CLion 2025.2 Help

Source code navigation

You can quickly navigate through your code in the editor using different actions and popups.

Navigate with the caret

  • To see the previous caret position, select Navigate | Back from the main menu or press Ctrl+Alt+Left. To move forward, select Navigate | Forward or press Ctrl+Alt+Right.

  • To quickly move to the top of the editor, press Ctrl+Page Up. To move the caret to the bottom of your editor, press Ctrl+Page Down.

  • To navigate to the last edited location, press Ctrl+Shift+Backspace.

  • To find the current caret location in the editor, press Ctrl+M. This action might be helpful if you do not want to scroll through a large file.

    Alternatively, you can press Up and Down arrow keys to achieve the same result.

  • To highlight a word at the caret you are trying to locate, select Edit | Find | Next Occurrence of the Word at Caret from the main menu. If you are using Windows, you can also press Ctrl+F3.

  • To see on what element the caret is currently positioned, press Alt+Q.

  • To move caret between matching code block braces, press Ctrl+Shift+M.

  • To navigate between code blocks, press Ctrl+[ or Ctrl+].

Move the caret

You can use different actions to move the caret through code. You can also configure where the caret should stop when moved by words and on line breaks.

  • To move the caret to the next word or the previous word, press Ctrl+Right or Ctrl+Left.

    By default, CLion moves the caret to the end of the current word. When you move the caret to the previous word, it is placed at the beginning of the current word.

    You can customize the caret position for these actions. In the Settings dialog (Ctrl+Alt+S) , go to Editor | General. In the Caret Movement section, use the When moving by words and Upon line break options to configure the caret's behavior.

  • To move the caret forward to the next paragraph or backward to the previous one, press Ctrl+Shift+A and search for the Move Caret Forward a Paragraph or Move Caret Backward a Paragraph action.

    You can also select a text and then move the caret forward or backward to a paragraph. Press Ctrl+Shift+A and search for the Move Caret Forward a Paragraph with Selection or Move Caret Backward a Paragraph with Selection action.

Find a line or column

  1. In the editor, press Ctrl+G.

  2. In the Go to Line/Column dialog, specify a line or column number, or both, separating them with : and click OK.

    Go to line/column dialog
  3. If you do not want to see the line numbers in the editor, in the Settings dialog (Ctrl+Alt+S) , go to Editor | General | Appearance and clear the Show line numbers checkbox.

Locate a code element with the Structure view popup

You can use the structure view popup to locate a code element in the file you are working on.

  1. To open the structure view popup, press Ctrl+F12.

  2. In the popup, locate an item you need. You can start typing a name of the element for CLion to narrow down the search. Press Enter to return to the editor and the corresponding element.

    Structure popup

Go to Declaration or Usages

You can navigate to the declaration of a variable, function, class, or type from its usage:

  • Place a caret at a symbol and press Ctrl+B.

  • For a type declaration, press Ctrl+Shift+B.

  • You can also point to the symbol keeping Ctrl pressed, and click, when it turns to a hyperlink. The popup message will show the declaration information. Click once again to navigate to the declaration.

    Go to definition

The Go to Declaration or Usages action (Ctrl+Shift+B) works differently for different cases:

  1. When invoked on a symbol usage, it navigates to that usage’s declaration.

  2. When invoked on a declaration, it shows the list of that declaration’s usages.

  3. When invoked on a definition, it shows the associated declaration.

You can choose between the first two options using the switcher in Settings | Editor | General:

Go to Declaration or Usages behavior

The default option is Show usages popup:

Go to Declaration showing usages

If you select Jump to predeclaration, the action navigates you to the declaration if it exists:

Go to Declaration

Go to definitions

  • You can keep track of class implementations and overriding functions using either the the Implemented method icon/the Implementing method icon, the Overridden method icon/the Overriding method icon gutter icons or the appropriate shortcuts.

  • Press Ctrl+Alt+B to navigate to the definition of a code entity at the caret (variable, function, class).

  • Press Ctrl+U to navigate to the super definition.

go to definition

Go to Header/Source

To switch between source and header files, you can use the dedicated Go to Header/Source action instead of Go to Related Symbol.

  • To invoke Go to Header/Source, press F10 or call Navigate | Header/Source from the main menu.

    The action either opens a file in the editor right away or shows the popup with the available options:

    Switching header/source

    While searching for the target file, Go to Header/Source uses a few heuristics:

    • The most recent switched file is always at the top of the list.

    • Next goes the file with the matching name from the same directory, if any (for example, myfile.h/myfile.cpp).

    • Then, a definition/declaration-based search is performed in the background, and new items are added to the popup.

    • If no single destination is found within 500 ms, CLion shows an interactive popup where new items are added, and you can select where you want to navigate to.

  • If you are accustomed to Go to Related Symbol for switching between header and source files, you can remap its shortcut to Go to Header/Source.

    Once per installation, CLion will prompt you to do that when you invoke Go to Related Symbol via the shortcut in a C/C++ file (if the non-default shortcut is not yet set for Go to Header/Source):

    Remap Go to Related Symbol to Switch Heafer/Source

    You can also configure the desired shortcuts in Settings | Keymap.

Browse through methods

  • Press Alt+Down or Alt+Up.

  • To visually separate methods in code, in the Settings dialog (Ctrl+Alt+S) , go to Editor | General | Appearance and select the Show method separators option.

    Method Separators in Editor
  • To open the Structure tool window, press Alt+7.

14 September 2025