Code SnippetsCode snippets are selections of frequently-used code. They can be stored in the Toolbox or the Project Manager, and quickly inserted into the current document. Creating SnippetsTo create a code snippet, select the desired block of text in the Editor pane. Then drag and drop the selected section to the Toolbox or the Project Manager. Alternatively, select the desired text, then right-click and select Add as Snippet in the Toolbox. Alternatively, right click in the Toolbox or on a project or folder name in the Project Manager and select Add Snippet. If you use this method, you must manually enter the contents of the snippet; text selected in the Editor pane will not be automatically added to the snippet dialog. Configuring SnippetsTo configure snippet properties, right-click the snippet in either the Toolbox or the Project Manager, and select Properties. The following configuration properties are available:
Using SnippetsTo insert the contents of a snippet at the current cursor position in the Editor pane, double-click a snippet in either the Toolbox or the Project Manager. Alternatively, right-click the snippet and select Insert Snippet. Note that, although you can also drag and drop snippets onto the Editor pane, the cursor position and indentation check box options explained above in Configuring Snippets will only take effect if the snippet is added using the double-click or right-click method. Snippet Key BindingsTo change the key binding for a code snippet, right-click the snippet in the Project Manager or the Toolbox, select Properties, then click the Key Binding tab. See Configuring Custom Key Bindings for a description of the fields on the Key Binding tab. ![]()
|