Code Templates

PyScripter

Code Templates
Previous Top Next

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 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|Options menu which displays the Code Templates dialog shown below.


graphic