File and Code Templates
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.
Tabs
Toolbar
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. CLion will apply this template when new files of this type are created. |
Reformat according to style | Select this check box, to have CLion reformat generated stub files according to the style defined on the Code Style page. |
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:
|
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. |
See Also
Last modified: 20 July 2016