Visual Studio Code Intellisense Code Snippets
Web Connection installs a set of code snippets into Visual Studio code which are accessible via the
wc- prefix in the editor. If installed you should see something like this:
Snippets vary in complexity from very simple static text expansions to more complex snippets that ask for input for naming. There are snippets that create entire HTML documents and mimic the full Visual Studio Page templates (use
You can check out the code snippets which live in this location:
You can open this file as a
JSON document in VS Code and see what each of the snippets does. As you can see code snippets are relatively easy to create and you can create your own snippets in a separate file.
Here are a few snipppets of interest:
These snippets stand templates that generate entire pages and are similar to the full Visual Studio Page templates. You can create a Script Content Page, a full self-contained Script page, a Layout Page and a standalone HTML Page all using the standard Web Connection styling.
These snippets insert various Web Connection wwHtmlHelpers like textboxes, dropdowns, labels, date time pickers, binding errors, error dialogs and so on.
There are a number of snippets that generate common Bootstrap constructs like
wc-menu-dropdown-buttonand so on. It's not all that comprehensive but I find I used these alot in the samples.
If you install VS Code after you install Web Connection, you'll have to manually copy the
code-snippet file to the appropriate folder.
From a Windows Command Prompt:
cd "\wconnect\VisualStudio\Visual Studio Code CodeSnippets" ROBOCOPY *.code-snippets "%appdata%\Code\User\Snippets"
CopySnippets.bat file in that folder that you can run as well.
Comment or report problem with topic