:::{index} Editor; Code Templates
:::

# Code Templates

Code templates are snippets of code that can be inserted in the editor. Each template has a 
short name, a description and the associated text. The text of a code template can contain
[parameters](parameters) which are automatically expanded when the text 
is inserted. For example the "Python Module Header" shown below contains the 
```$[ActiveDoc-Name]``` and other parameters. If the character "|" is present in the template,
after the insertion of the template text, the cursor is placed at the position of that character
and the character is deleted.   

**How to insert a code template in the editor:**

Type the template name and press the code template shortcut Ctrl-J. If you do not remember 
the name of template just press Ctrl-J and select from the pop-up list.  

**How to create/modify code templates:**

Select "Customize Templates..." from the [Tools](toolsmenu)|Options menu which displays the Code 
Templates dialog shown below.  
  
![graphic](images/codetemplates1.JPG){align=center width="26.31em" height="25.81em"}

