Wiki

Case Status
Log In

Wiki

 
Whole Tomato Software - Home
  • RSS Feed

Share VA Snippets among users

Visual Assist supports private VA Snippets, which are shared among all IDEs for a single developer, and shared VA Snippets, which are stored in a public location and shared among multiple users of Visual Assist. Private VA Snippets are created during installation of Visual Assist; they are stored locally, in %APPDATA%. Shared VA Snippets can be created from a copy of the private VA Snippets of a single developer.

Precedence

Shared snippets with shortcuts have precedence over private snippets with identical shortcuts. If there exists a shared VA Snippet with the shortcut "if", it will appear in listboxes before private snippets with the same "if" shortcut.

If private VA snippets for refactoring and suggestions-for-type exist, they have precedence over shared versions. Currently, the only way to give precedence to shared refactoring and suggestions-for-type is to configure sharing, and then delete private versions of the snippets; only in this case does Visual Assist not automatically recreate private versions.

If shared VA Snippets do not exist for a given programming language, Visual Assist uses only private VA Snippets. Hence, there is no need to create shared VA Snippets for all programming languages.

Registry Setting

To share a set of VA Snippets among users, create the following string value (REG_SZ) in the registry for each user of Visual Assist, and set the entry's value to the directory where the shared VA Snippets reside. The directory can be local, on a mapped network drive, or on a network share.

HKCU\Software\Whole Tomato\Visual Assist X\<IDE spec>\SharedSnippetsDir = <shared directory>

Create Shared VA Snippets

A simple way to create a set of shared VA Snippets is to:

  1. Backup your private VA Snippets, for the programming languages whose snippets you want to share. You can find VA Snippets in .tpl files in:

    %APPDATA%\VisualAssist\Autotext\
     
  2. Use the VA Snippet editor within Visual Assist to create/edit your private snippets so they are applicable to multiple users. Be sure to delete VA Snippets that you do not want to share, as shared snippets have precedence over private versions.
     
  3. Copy the modified VA Snippets to your shared directory.
     
  4. Restore your private VA Snippets.

Permissions

Set permissions of files containing shared VA Snippets to read-only so users are unable to edit them. When read-only, users are able to copy shared VA Snippets to make private versions, albeit shared VA Snippets with shortcuts have precedence over shared versions.

In the unlikely event the directory in which shared VA Snippets is writeable, create empty, read-only tpl files for unused programming languages to prevent users from inadvertently creating shared versions.