Skip to content

Instantly share code, notes, and snippets.

@ethan-deng
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethan-deng/08b27675fd3ff8de70f0 to your computer and use it in GitHub Desktop.
Save ethan-deng/08b27675fd3ff8de70f0 to your computer and use it in GitHub Desktop.
Let JS code fly in Visual Studio

Let JS code fly in Visual Studio

Here is a few things to check out to let your JS code fly in Visual Studio.

  1. Check available code snippets at "Tools" -> "Code Snippets Manager ..."
  2. Install jQuery Code Snippets from "Tools" -> "Extensions and Updates" -> Search
  3. Install Brace Completer" from "Tools -> "Extensions and Updates" -> Search
  4. 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.

Create Your Own Snippets

Walkthrough: Creating a Code Snippet

Snippet Designer

Snippetizer

"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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment