The Templates feature helps you to write code quickly and accurately. Templates are shortcuts used to insert a framework for the segment of code you are about to write.
Once you have inserted a template, you can then compose the code using a combination of manual and automated (see Code Completion) code entry methods.
Template Features:
|
|
Customize existing templates or create new templates with the Add and Edit options. |
|
|
Share templates using the import/export option. |
The template list is a sortable list that can be sorted by Key, Context and Description:
|
|
Key- The key combination typed to insert the template into the Editing window. |
|
|
Context- The templates functional context, e.g. HTML, PHP, or PHP doc |
|
|
Description- A textual description of the template. |
Adding, Editing, and Removing Templates
Add, Edit, or Remove templates from the list of templates maintained by Studio.
To add a template:
Open the Preferences Window from the Main Menu, select Tools | Preferences.
Select the Templates tab.
The Templates tab opens.
To add a new template, click Add.
The Add a New Template dialog appears.
Enter an Abbreviation, Context, Description, and Template Code.
To add a variable from the list of variables maintained by Studio, use the Add Var function.
Click OK to add the new template to the list of templates in the Templates tab.
To permanently add the new Template to the list of templates maintained by Studio, click Apply or OK on the Templates tab.
To edit an existing template:
From the Templates tab, select the template you wish
to modify.
Click Edit.
The Edit Template dialog appears.
Edit the template code (using standard text entry methods and/or the Add Variable feature).
Click OK.
The edited version of the template appears in the Preview pane of the
Templates tab.
To permanently add the edited version of the template to the list of templates maintained by Studio, click Apply or OK on the Templates tab. The edited version of the template is saved to the list of templates on the Templates tab.
To remove an existing template:
From the Templates tab, select the template you wish to modify.
Click Remove.
The template is removed from the list of templates in the Templates
tab.
To permanently remove the template (non-default) from the list of templates maintained by Studio, click Apply or OK.
Note:
OK saves your additions and exits the Template tab; Apply saves your additions, but allows you to continue working on the Templates tab. To exit the Template tab without saving your additions, click X in the upper right-hand corner of the Templates tab screen.
|
|
|
|
|
Related Links: Preferences Setting Code Completion Preferences |
|
|
|