Snippet Options

You can control what file types can use snippets. To enable or disable snippet use for each file type, Select Options > File Type Options and select or de-select the "Enable code snippets" option. If the code snippets are disabled, then code snippets will not be proposed in the auto-completion list while you edit, and text variables will not have any special behavior in those files.

You can control automatic text variable replacements on a per-snippet basis. In the Snippet panel, select a snippet and click the Edit Snippet button (Ctrl+E). Select or de-select the "Enable text variables when insert­ing" option as desired.

You can also enable or disable text variables for all snippets in the Snippet Window Options of the Snippet panel. Select or de-select the "Enable text variables when inserting" option as desired.

See: Snippet Window Options.

Project vs Global Snippets

Snippets can be project-specific, or common to all projects. The Storage Location of a snippet specifies if the snippet is stored with the project, or global. Global means it is common to all projects. The Snippets panel lists all your snippets, both project and global.

Global snippets which apply to all projects are stored in a file named global.snippets.xml in the Source Insight 4.0 documents folder inside the Snippets folder. For example:

C:\Users\John\Documents\Source Insight 4.0\Snippets\global.snippets.xml

Project-specific snippets are stored in a file named <project-name>.snippets.xml in your project data directory. For example in a project named "myproject" :

C:\Users\John\Documents\Source Insight 4.0\Projects\myproject\myproject.snippets.xml


For more information: See: Snippet Window.