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 onto the Toolbox tab or the Projects tab. Alternatively, select the desired text, then right-click and select Add as Snippet in the Toolbox. Alternatively, right click on the Toolbox tab or on a project or folder name on the Projects tab, and select New 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 on either the Toolbox tab or the Projects tab, 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 on either the Toolbox tab or the Projects tab. 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 on the Projects tab or the Toolbox tab, select Properties, then click the Key Binding tab. See Configuring Custom Key Bindings for a description of the fields on the Key Binding tab. ![]()
|