Scopes and File Colors
Create a new scope
Create a new scope
Open Settings (Ctrl+Alt+S) and navigate to Appearance & Behavior | Scopes, click the Add scope (Insert) icon().
Select Local or Shared from the drop-down list.
Local scopes are intended for a personal use only and are stored in your workspace. Default location:
Shared scopes are defined for the current project and accessible for the team members via VCS. Default location:
Specify a name of the scope.
Configuring a list of items in a scope
Configure a list of items in a scope
Navigate to File | Settings | Appearance & Behavior | Scopes, select the scope that you want to configure.
- To define a pattern for the scope, perform one of the following actions:
To include files and directories in the scope, select files and directories and press Include or Include Recursively (with subdirectories) buttons. To exclude a file or a directory, use Exclude or Exclude Recursively. CLion creates an expression and displays it in the Pattern field.
Specify a pattern in the Pattern field manually, using the scope language syntax .
Associating file color with a scope
Files belonging to different scopes can be highlighted in different colors throughout the CLion's user interface: in navigation lists, in the editor tabs, in the Project Tool Window. This allows much faster and easier navigation in large projects.
Associate file color with a scope
Navigate to File | Settings | Appearance & Behavior | File Colors.
Click Add ().
In the Add Color Label dialog, select a scope and pick a color for it.
Define the area where you want to use scope colors. To define the area, select Use in Editor Tabs or Use in Project View checkboxes.
Select the accessibility level of the scope color association. To share the color association, click the Share icon(). The default location for file color associations is
Arranging the order of scopes
If some file is included into several scopes, the order of the scopes becomes important: CLion uses the color of the uppermost scope (shown in the Scopes settings page) to highlight such file. Of course, you can change the order of the scopes, and thus the resulted highlighting.
Arrange the order of scopes
Navigate to Files | Settings | Appearance & Behavior | Scopes.
Select a scope that you want to move.
To change the order, click Move Up () or Move Down icons ().