Find and Replace in Project
You can search for occurrences and usages of targets within a project, and narrow your search by using different scopes and excluding certain items.
Find your target in a project
From the main menu, select(Ctrl+Shift+F).
In the search field, type your search string. To see a list of your previous searches, press Alt+Down.
If you need, specify the additional options.
CLion lists the search strings and files containing them.
To do a multi-line search, click the icon to enter a new line, and press Ctrl+Alt+Down / Ctrl+Alt+Up to browse through occurrences.
Check the results in the preview area of the dialog where you can replace the search string or select another string, press Ctrl+Shift+F again and start a new search.
If you need to see the list of occurrences in a separated tool window, click Open in Find Window. You can use this window and its options to group the results, preview them, and work with them further.
Narrow your search
You can use different options in the Find in Path dialog to adjust your search process.
In the Find in Path dialog, select options such as Words or Match case to find the exact word in a project, or match the letter case.
Click the icon to filter your search. For example, you can filter the search to omit comments or search only in comments instead.
Select one of the displayed options such as Module or Directory to limit your search. Moreover, you can select the Scope option that offers you a list of predefined scopes for your search.
For example, you can limit your search only to the open files in your project or you can search in a class hierarchy.
You can also create your own custom scope, click the icon to open the Scopes dialog.
Search in the specific file types
Use the File Mask option to narrow your search to a specific filetype. You can select the existing filetype from the list, add a new filetype, or add an additional file mask syntax to search for file types with certain patterns.
In the Find in Path dialog, select the File Mask checkbox and from the list of file types, select the one you need. CLion limits its search to the specified type.
If you don't find the filetype you need in the list, enter your filetype in the File Mask field.
For example, use the following syntax to search only in gradle files: *.gradle.
*, other wildcards are supported. If necessary, specify several file types using commas as separators.