for Windows and Linux
for OS X
Ctrl+Alt+S
Files can be created according to pre-defined templates (file templates). Use this page to view, edit, and create such templates.
Different groups of templates are located on different tabs.
When you select a template, its contents and description are displayed in the right-hand part of the page.
Per-project vs default scheme
| Item | Description |
|---|---|
| Scheme | From this drop-down list, choose whether file and code template settings pertain to the entire
workspace, or the current project:
|
Refer to the section Project and IDE Settings for details.
Tabs
Toolbar
| Item | Tooltip | Description |
|---|---|---|
![]() | Create Template | Click this button to create a new template in the currently opened tab. This option is only available in the
Files and the Includes tabs.
The location of the new template is defined by the Schema drop-down list. If |
| Remove Template | Click this button to delete the selected template. This option is only available for certain templates in the Files and the Includes tabs. |
![]() | Copy Template | Click this button to create a copy of the selected template. This option is only available in the Files and the Includes tabs. |
![]() | Reset to Default | Click this button to revert the selected template to its original state. This option is only available for templates that have been modified (they are highlighted in blue). |
| N/A | Reset | This link appears in the top-right corner of the page when you start editing a template. Clicking this link resets all unsaved changes to any template in any tab. |
Template settings and contents
| Item | Description |
|---|---|
| Name | This text box appears when a new template is created. Specify the name of the new template. |
| Extension | In this text box, specify the extension. PyCharm will apply this template when new files of this type are created. |
| Reformat according to style | Select this check box, to have PyCharm reformat generated stub files according to the style defined on
the Code Style page.
This option is only available in the Files tab. |
| Enable Live Templates | Select this check box to use a live template inside a file template. So doing, one has to put the
live template fragments into Velocity escape syntax.
For example: #[[ $MY_VARIABLE$ $END$ ]]#
Thus, one can specify the cursor position. Note that it is required to use the live template variables here! |
| Template text | Edit the template contents. You can use:
PyCharm doesn't prompt for the values of Velocity variables defined with |
| Description | This read-only field provides information about the template, its predefined variables, and the way they work. This field is not available in custom templates. |


