Code Templates
Code templates are pieces of code that you can insert easily into your code by pressing only a few key strokes. Code templates are actually Code Snippets from the Library that have an assigned callword. A callword is an abbreviation you will be using to call a code template that is connected to it.

Inserting code templates
Inserting code templates is easy, it can be done in two ways:
- By using the shortcut key Ctrl+J which opens the code templates popup box and then selecting the code template.
- By typing the callword associated with the code template you want to insert and then pressing Ctrl+J which will replace the callword with the associated code template.
Note
If you see no popup box after pressing Ctrl+J, it means that there are no snippets in the Library that have an assigned callword.
Over the time you might acumulate large amount of snippets. If you work with more than one programming language, it may be a good idea to group code templates by means of assigning common prefixes to the callwords. For example, a snippet in PHP that defines an if-else block, could be given a callword "phpife".
Create a code template
- On the Options menu click Library Editor.
- Select one of available folders or use New Folder or Subfolder button to create a new one.
- Click New Snippet.
- Snippet Editor appears. In the Name box, enter title for the snippet. Then enter snippet contents in text edit box(es).
- In the Name box, enter title for the snippet. Then enter snippet contents in text edit box(es).
- In the CallWord box, enter a unique callword for the code template. Only snippets having an assigned callword are treated as code templates.
- Click OK to save code snippet (template).
- Click Close to exit Library editor.
|