You can configure the presentation of files with the same names but with different suffixes. Such file bunches can be presented as plain structures or the parent files can be shown as folders (nests) with their child files inside.
Such bunches of files may appear in framework-specific projects, for example, if you use Angular.
File nesting rules: not applied
File nesting rules: applied
Configure file nesting
In the Project tool window (Alt01), click and select Appearance, then select File Nesting.
A dialog opens in which you can configure file nesting rules.
Enable the Show files with the same names as nested option to recognize child files based on the patterns from the list and display them grouped under the corresponding parents.
Otherwise, PyCharm shows parents and children at the same level.
Configure nesting rules. You can edit predefined rules or specify new ones: click and specify suffixes of parent and child files.
When configuring a rule, consider the following:
Multilevel nesting is not supported. For example, if a TypeScript file file.ts is compiled into file.js with file.js.map generated, both file.js and file.js.map are shown right under file.ts.
Wildcards are not welcome.
Click OK.
note
Nesting rules apply only to the files with the same names within the same directory.
If the names of two files match a pattern but the files are stored in different directories, PyCharm does not visually "move" any of them.
Thanks for your feedback!
Was this page helpful?
Cookie Settings
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.