Here is a few things to check out to let your JS code fly in Visual Studio.
- Check available code snippets at "Tools" -> "Code Snippets Manager ..."
- Install jQuery Code Snippets from "Tools" -> "Extensions and Updates" -> Search
- Install Brace Completer" from "Tools -> "Extensions and Updates" -> Search
- Learn the OOTB JS snippets.
This is relatively straight forward. For example to create a funtion, the shortcut is just "function" + Tab. To create a HTML <div>
, just type div + Tab.
Walkthrough: Creating a Code Snippet
"Snippet Designer" supports VS 2012/2013 and "Snippetizer" support VS 2013. Both support selecting code and right click to create snippet. When creating jQuery snippet, $ have to be repaced with $$ or use "Snippet Designer" which supports using different Delimiter. Overall I found "Snippet Designer" is easier than "Snippetizer".