File and Code Templates
File | Settings | Editor | File and Code Templates
Files can be created according to pre-defined templates (file templates). Use this page to view, edit, and create such templates.
Existing templates are listed in the central part of the page. Different groups of templates are located in different tabs.
When you select a template, its contents and description are displayed in the right-hand part of the page.
|Create Template||Click this button to create a new template in the currently opened tab. This option is only available in the Templates and the Includes tabs.|
|Remove Template||Click this button to delete the selected template. This option is only available for certain templates in the Templates and the Includes tabs.|
|Copy Template||Click this button to create a copy of the selected template. This option is only available in the Templates 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
|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. WebStorm will apply this template when new files of this type are created.|
|Reformat according to style||Select this check box, to have WebStorm reformat generated stub files according to the style defined on
the Code Style page.
This option is only available in the Templates tab.
|Template text||Edit the template contents. You can use:
|Description||This read-only field provides the information about the template, its predefined variables, and the way they work. This field is not available in custom templates.|