Managing Snippets |
See Also |
Snippets enable you to insert code in your query editor when you type a snippet name and then press ENTER. You can set other completion keys that will insert candidates, for example TAB.
SQL Prompt is pre-configured with default snippets, for example, the ssf snippet inserts a SELECT * FROM fragment. Similarly, the cdb snippet inserts a CREATE DATABASE statement and places the insertion point after the CREATE DATABASE fragment for you to specify the name of the new database. You can edit or delete the default snippets.
You can create your own snippets of code, including specifying the position at which SQL Prompt will place the cursor after it has inserted the snippet of code. You specify the insertion point using the variable $CURSOR$. For example, SELECT $CURSOR$ FROM places the insertion point after SELECT.
To manage snippets, on the SQL Prompt menu in your query editor, click Options, and then click the Snippets tab.

The Snippets tab displays a list of default and custom snippets, listed in alphanumeric order. You can view the code for a snippet by clicking it.
To restore the default snippets if you have edited or deleted them, right-click the list of snippets, and click Reset default snippets.
The Snippet Properties dialog box is displayed.

If you are unsure of the snippet name, the description helps you to identify a snippet.
The Snippet Properties dialog box is displayed.
| See Also |
Using the Candidate List | Setting Availability | Setting Candidate List Behavior | Setting Styles | Setting Automatic SQL Insertion | Managing Connections | Managing Aliases
© Red Gate Software Ltd 2007. All Rights Reserved.