and usages search
Go to class/file/symbol
Search through the whole project for a class (Ctrl+N), file (Ctrl+Shift+N) or symbol (Ctrl+Alt+Shift+N) by its name. Completion feature will help you to find the appropriate name quickly.
Navigate to declaration/definition
Use special icons in the left-hand gutter to jump to the declaration of a symbol (Ctrl+B) or its definition (Ctrl+Alt+B). If standing on a declaration, Go to declaration serves as Show usages.
Related symbols and recent files
Navigate to the related symbol with Ctrl+Alt+Home to switch easily between the header and source files.
To go back to a file you’ve been working with recently, use Recent files (Ctrl+E) or Recently changed files (Alt+Shift+E).
Bookmarks and TODOs
Set some markers called bookmarks in your code to navigate through the code easily. All the bookmarks will be listed in the Favorites window. Or you can invoke the whole list by pressing Shift+F11.
You can also leave some reminders in the code. Just type TODO in the comments, and CLion will keep track of it and list all the TODOs in a separate view. As a nice bonus, you can check any of these marks left in the code before committing your changes to the VCS.
Views and hierarchies
CLion offers various views to help you browse your code and get a bird’s eye view of the
whole project. These can be found at
View | Tool Windows.
- Project view presents the structure of files and folders in your project.
- Structure view displays the structure of the currently opened file.
- Hierarchy views show the calls hierarchy and the hierarchy of imports and types.
CLion can help you find anything, be it an item in the source code, user action, or UI element. Press Shift twice and start typing what you are looking for. You can also configure the search scopes based on your specific needs.
In this mode you can scrutinize your code, by simply hovering the mouse over any section in the scroll bar. In case you hover over a warning or error strip, the code fragment will be annotated with an appropriate message.
Find or highlight usages
In CLion you can easily locate the usage of any symbol (class, function, variable, macro, etc.) in your code. To highlight all usages of a symbol in the current file, press Ctrl+Shift+F7 and then jump between them. (next - F3, previous - Shift+F3). Alternatively, list all usages in a separate window with Find Usages (Alt+F7). Note that CLion understands symbol context: it does not give you text matches, but actual usages of the symbol you search for.
Search results are displayed in a hierarchy in a separate window. You can filter results by category, group them by directory or file structure, and autoscroll to the source code: