Code snippets help to boost SQL code typing. You can use predefined snippets provided in the application and create your own to insert them in SQL scripts and queries.
dbForge Studio code snippets are XML files with the .snippet file name extension.
The Code Snippets window contains a rich collection of templates organized in folders. In this window, you can arrange and preview snippets. To view a snippet, select it in the window. If the preview pane is not visible, right-click a snippet and select Toggle preview from the menu.
Alternatively
Code snippets can also be inserted by entering template shortcut word or words and pressing the TAB key.
Note
If you want to include a code fragment into the inserted template, select it with the mouse pointer before placing snippet to the editor. If the snippet does not provide surrounding, selected text will be deleted.
To move the snippet to the root folder of the Code Snippets window, drag it on the one that already is in the root folder or to the upper border of the Code Snippets window.
Click New Snippet on the manager toolbar.
Note
Actual document look may slightly vary from the above image, depending on the product you use.
Specify a shortcut and snippet description in the corresponding Shortcut and Description fields.
Notes
The Location field is read-only and is filled automatically when you choose the folder available in the list of snippets.The shortcut (if any) will be taken as snippet name. If there is no shortcut specified, the new snippet will be named Snippet. To change the snippet name, double click it in the list of snippets and enter the needed name.
Select the required snippet from the list of available snippets.
Note
Actual document look may slightly vary from the above image, depending on the product you use.
By default, all snippets are stored in a folder that is located at C:\ProgramData\Devart\dbForge Studio for SQL Server\Snippets.
You can change the default location when editing an existing snippet or creating a new one by setting a new path in the Location field of Snippets Manager.