Surround With wraps selections with code specified in VA Snippets. The surrounding is available in several places in the UI of Visual Assist.
Surround With differs from Surround Selection, another feature of Visual Assist. Surround With provides complete control of inserted text whereas Surround Selection does not.
Access via Menu
Multiple menus provide access to the surrounding, including VAssistX in the menubar, Surround With in the VA Outline, and Surround With (VA) in the context menu of the text editor.
![](/~/media/wholetomato/kb/documentation/surround-with/snippetcontextmenusurround.ashx?la=ru&hash=DA9A4EF2EC284C8600982A583BB446F2A4EFE9C5)
Create your own VA Snippets for Surround With or edit several VA Snippets required by the feature.
Access is also available by selecting code in the text editor and typing a preassigned character. Your selection is wrapped instead of replaced. Assign the character in the definition of your VA Snippet for Surround With.
![](/~/media/wholetomato/kb/documentation/surround-with/snippetassert.ashx?la=ru&hash=ACBF80468598B6F8032768F0ADD6D56336FFCB72)