Select View | Code Snippets from the menu (CTRL+ALT+T).
Right-click a folder where you want to add a snippet and select New Snippet.
Enter a name for the new snippet and press ENTER.
In the syntax editor (top pane of the Design tab), compose the snippet. Specify the remaining properties as necessary. See Define Code Snippet Properties for more information.
To create a Surrounds With snippet
Select View | Code Snippets from the menu (CTRL+ALT+T).
Right-click a folder where you want to add a snippet and select New Snippet.
Enter a name for the new snippet and press ENTER.
In the syntax editor (top pane of the Design tab), compose the snippet. Now place the cursor within the snippet in the location of the text to be surrounded, and then right-click and select Snippet Tokens | Selected Token .
Next, place the cursor in the location that you want the cursor after inserting the snippet. Right-click and select Snippet Tokens | End Token.
Select SurroundsWith as the Snippet Type in the Properties tab (bottom pane).
Specify the remaining properties as necessary. See Define Code Snippet Properties for more information.
Note: To insert a SurroundsWith snippet, select the block of text in the Editor, then right-click and select Snippets | Surround with.
To import or export code snippets
Use the Snippets toolbar to:
Import snippets. Click to import snippets to the folder selected in the Code Snippets window. | |
Export snippets. Click to export your entire snippet library to a destination folder. |
To define properties for a snippet
Select the Design tab in the Snippet Properties dialog.
Compose the snippet and define the snippet properties. Review the following for additional information:
Syntax Editor (top pane) |
Description | ||||||||||||||||||||||||||||||||||||||
Parameters |
Enclose the parameter name with $ characters. For example, to define a parameter named 'scope' enter $scope$). | ||||||||||||||||||||||||||||||||||||||
Right-click and select Snippet Token to add the following:
| |||||||||||||||||||||||||||||||||||||||
Right-click and select System Variables to add the following:
| |||||||||||||||||||||||||||||||||||||||
Properties Tab (bottom pane) |
Description | ||||||||||||||||||||||||||||||||||||||
Shortcut |
Enter the shortcut word or phrase. If defined, you can use the shortcut to quickly insert the snippet into the Editor by typing the shortcut, and pressing CTRL+SPACE. | ||||||||||||||||||||||||||||||||||||||
Keywords |
Enter any keywords associated with the snippet (space or comma delimited). You can search for snippets using keywords. See Insert Code Snippets for more information. | ||||||||||||||||||||||||||||||||||||||
Snippet type |
Select one of the following:
| ||||||||||||||||||||||||||||||||||||||
Parameters tab (bottom pane) |
Description | ||||||||||||||||||||||||||||||||||||||
Identifier | Enter the parameter identifier. This must match the parameter name in the syntax editor of the Design tab (without the $ delimiters). | ||||||||||||||||||||||||||||||||||||||
Default Value | Enter the default value of the parameter, if needed. | ||||||||||||||||||||||||||||||||||||||
Tooltip | Enter a tooltip that displays when the cursor is placed over the parameter. | ||||||||||||||||||||||||||||||||||||||
Caution: Do not use the "1 of n" field to attempt to navigate parameters. This field specifies the order in which parameters are evaluated. |
Tip: To quickly add $ characters to identify a parameter, select the parameter in the syntax editor of the Design tab. Select the Parameters tab (bottom pane) and click +. All further instances of the parameter are automatically delineated with $ characters.
Tips:
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Términos de uso Privacidad Cookie Preference Center