---
title: "Visual Studio Code Plugin"
canonical: "https://docs.vaultspeed.com/space/VPD/3038117893/Visual%20Studio%20Code%20Plugin"
format: markdown
---
For ease of writing Templates in the VaultSpeed DVT (data vault template) language, we have created a plugin for the open-source based tool Visual Studio Code ([https://code.visualstudio.com](https://code.visualstudio.com/)).  This will enable syntax highlighting and code snippets.

# Installation

On the menu Business Vaults → VaultSpeed Studio, click the button to Download the “VS Code Plugin”.  The downloaded zip file contains a README with installation instructions.

![image](media://d66a5b58-0f11-4dfb-b37e-f774a45c2c41)

Once downloaded, unzip the file and **add the dvt folder** to the **extensions** folder of visual studio code, based upon the system, it will be in these default locations.  (location may vary on your setup)

|  |  |
| --- | --- |
| Windows | `%USERPROFILE%\.vscode\extensions` |
| MacOS | `~/.vscode/extensions` |
| Linux | `~/.vscode/extensions` |

After you have moved this folder you will need to restart visual studio code.

  
We recommend using the “Dark+” theme in VScode.

# Code Snippets

Our VS code plugin has a set of snippets defined, these allow for quick definition of the different template parts.  
To use snippets, just start typing, for example: typing `comp` will open a popup will a set of options. There are a bunch of different options, depending on which query you want to write.

![image](media://d9cd4972-8131-415c-8246-6d2eed5521b9)

Selecting the “select from join where” option will insert the following code:

![image](media://6313c186-af1b-4465-b01c-c89a2481057f)

The only thing left to do is fill in the details, the first component group name is already highlighted, enter a name and press tab. The next field will be highlighted, in the case the INS_GRP and since this is a multiple choice field instead of a name so a popup will appear with the available choices, select one and press tab again to move to the next field.

![image](media://309b5260-2988-45d9-8aa0-7d3770d496a4)

The next field is a repetition, since this one is used in multiple placed, when you type a value here it will add it in multiple places (see the cursors in the following image).

![image](media://a608f3f0-b199-4d6c-803a-1c5138a84935)

Similarly, when we get to editing the name of the source component, it will also be filled in in multiple places at the same time such as in connections and attributes.

![image](media://42ea4845-47ca-452a-a17b-07a7f28ce75b)

Similarly to component groups, when you type Attribute it will show snippets for an attribute (at the moment it is just with and without condition, more will be added later).

![image](media://8a9c1603-0275-4f2c-85f4-0f6d894e5a5f)

For components, there are also a bunch of snippets available for adding all the types such as joins, filters, selects, updates different parts of a merge etc.

![image](media://23641789-d000-41d5-8fcb-fe1860c19502)