CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Live templates

Last modified: 13 October 2021

Expand a live template: Tab

Configure: Ctrl+Alt+S Settings/Preferences | Editor | Live Templates

Use live templates to insert common constructs into your code, such as loops, conditions, various declarations, or print statements.

To expand a code snippet, type the corresponding template abbreviation and press Tab. Keep pressing Tab to jump from one variable in the template to the next one. Press Shift+Tab to move to the previous variable.

live template example

The following demo illustrates the usage of live templates, along with the Extract function, Extract parameter, and Extract lambda parameter refactorings: