Table of content
WholeTomato

VA Snippets Required

Numerous VA Snippets are required for the Refactoring, Code Generation, and Smart Suggestions features of Visual Assist. Several other VA Snippets are required for less-prominent features, yet remain important because they control format of code inserted or modified by Visual Assist.

If you delete any of the required VA Snippets, Visual Assist will recreate default entries.

You can modify the default code for any of the required VA Snippets, including for the less-prominent VA Snippets described in this page.

C/C++

#ifdef (VA)

This VA Snippet defines the format of #ifdef directives inserted by the Surround With feature of Visual Assist, as well as those inserted by the Surround Selection feature—a quicker way to surround.

Surround Selection is enabled in the options dialog for Visual Assist.

When '#' is toggled on for Surround Selection, select lines and press a single '#' to surround the selection with an #ifdef. Assuming the default VA Snippet is intact, an input dialog opens for the condition of the #ifdef.

#region (VA)

This VA Snippet defines the format of #pragma directives inserted by Surround With, which can be invoked from the context menu of the text editor.

The same VA Snippet is invoked from the context menu of the VA Outline.

When invoked, an input dialog opens for the name of a region. Accept to surround your selection with the #pragma.

(...)

This VA Snippet is invoked only when you surround a selection with parenthesis using the context menu of the text editor.

Modify the VA Snippet if you prefer spaces next to your parentheses.

This VA Snippet is used by Surround With, not Surround Selection.

{...}

This VA Snippet is invoked only when you surround a selection with braces using the context menu of the text editor.

This VA Snippet is used by Surround With, not Surround Selection.

namespace (VA)

This VA Snippet defines the format of namespaces inserted by Surround With, which can be invoked from the context menus of the text editor and VA Outline.

C#

#region (VA)

This VA Snippet defines the format of #region directives inserted by Surround With, and similar to the #ifdef entry for C++, those inserted by Surround Selection.

Surround With is invoked from the context menus of the text editor and VA Outline.

When invoked using the default VA Snippet, #region directives are inserted without a dialog, and the caret is positioned such that you can name the region.

(...)

Similar to the liked-named VA Snippet for C++, this VA Snippet is invoked only when you surround a selection with parentheses using the context menu of the text editor.

{...}

Similar again, this VA Snippet is invoked only when you surround a selection with braces using the context menu of the text editor.

namespace (VA)

Similar to the like-named VA Snippet for C++, this VA Snippet defines the format of namespaces inserted by Surround With and typically invoked from context menus.