You can create and reuse code snippets in the Editor.
Note: The file associated with these items is located in:
C:\Users\<user>\AppData\Roaming\Quest Software\Toad for Oracle\<version>\User Files\CodeSnippets.dat
To use Code Snippets
- From the View menu, select Code Snippets.
- Select a category of code from the box at the top of the window.
- Select the code from the list. You can do the following:
- View a description of the code in the area below the code list
- Double-click the code to insert it into the active editor tab
- Drag and drop code into the editor
To Edit Code Snippets
- In the Toad Options window (View | Toad Options), select Code Snippets.
- In the Code Snippets list, select the category of snippets you want to edit and then click Edit.
- Select the snippet you want to edit, and click Edit.
- Edit the Oracle Function or the description and click OK.
To Add Code Snippets to an existing category
- In the Toad Options window (View | Toad Options), select Code Snippets.
- In the Code Snippets list, select the category of snippets and then click Edit.
- Click Add.
- Enter the code in the Oracle function box.
- Enter a description in the Description box.
- Click OK.
To Add Code Snippets to a new category.
- In the Toad Options window (View | Toad Options), select Code Snippets.
- In the Code Snippets list, click Add.
- Enter a category name in the Category box.
- Enter the code in the Oracle function box.
- Enter a description in the Description box.
- Click OK.
To highlight a snippet
- Place your code in the snippet you want to highlight.
- From the Editor menu, select Highlight Snippet (CTRL+H).