Parent page: TextEdit Commands
The following pre-packaged resource, derived from this base command, is available:
Place Code TemplateExpandСвернуть
Applied Parameters: None
Summary
This command is used to place a code template into the current document. Code templates are predefined blocks of code that can be automatically placed in a coding-aware text-based file, and are an excellent productivity aid when you are writing code in a particular language. Each code template has three properties: a name, a description, and the actual code to be inserted by the template.
Access
This command can be accessed from the Text Editor (or any coding-aware variant of the Text Editor), by:
- Choosing the Tools » Show Code Templates command from the main menus.
- Clicking the
button on the Utilities toolbar.
While typing within the editor, the command can be easily accessed by using the Alt+T, T keyboard sequence.
Use
The command can be used in two ways:
- Enter the defined name for the required code template, then launch the command. The code template with that name will be placed (replacing the template name you just typed). If you can't remember the full name of the required template, simply start typing characters, then launch the command - a pop-up listing all defined code templates with that root naming will appear, from which to choose.
- Place the cursor at the required location in the file, then launch the command. A pop-up window listing all available code templates defined for the associated language will appear. Simply choose the required entry to place that template.
Tips
- Each code template is identified by its name, as specified in the Code Templates Editor dialog. Access to this dialog can be made from the Language Setup dialog (click
on the Utilities toolbar), by choosing the Templates command from the Menu.