This section describes how to configure scopes and coloring of the files belonging to these scopes:
- Creating a new custom scope
- Configuring the list of items in a custom scope
- Associating file color with a scope
- Arranging the order of scopes
Project scopes are configured in the Scopes page of the Settings dialog box.
- In the Scopes settings page, click Add scope
.
-
Select
Local or
Shared from the drop-down list.
Shared scopes are defined for the current project and accessible for the team members via VCS,
while Local scopes are intended for personal use only and are stored in your workspace.
You can change the sharing state later using the Share scope check box in the bottom of the page.
- Specify the name for the new scope.
- Apply changes.
- In the Scopes settings page, select the scope that you want to configure.
- Do one of the following:
- Choose files and folders to be included in the scope and use buttons on the right. Based on the inclusion/exclusion, PyCharm creates an expression and displays it in the Pattern field.
- Specify pattern in the Pattern field manually, using the scope language syntax.
- Apply changes.
Files belonging to different scopes can be highlighted in different colors throughout the PyCharm's user interface: in navigation lists, in the editor tabs, in the Project window . This allows much faster and easier navigation in large projects.
- Open the File Colors settings page.
- Decide whether you want the scope-color association to be only available to you or to be shared
with the team. Depending on that, use either Local colors or Shared colors section of the page.
You can change the sharing state later by selecting a color in the list ans using the Share
button in the Local colors section or the Unshare
button in the Shared colors section of the page.
- Click Add
.
- In the dialog box that opens, select a scope and pick a color for it.
- If necessary, use the check boxes on top of the page to define where in the user interface files belonging to the scopes are highlighted.
- Apply changes.
If some file is included into several scopes, the order of the scopes becomes important: PyCharm 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.
- Open the Scopes settings page.
- Select a scope whose position in the order you want to change.
-
Click
Move Up
/ Move Down
- Apply the changes.