But, the one thing that they are missing in the Web Essentials Extension is a snippet to allow you to automatically insert the region syntax. Just save this text to “C:\Users\$UserName$\Documents\Visual Studio 2012\Code Snippets\JavaScript\My Code Snippets\regions.snippet” on your local computer, and viola!
<CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> <Header> <Title>region</Title> <Author>Daryl LaBar</Author> <Shortcut>region</Shortcut> <Description>Code snippet for region in javascript Using Web Essentials 2012</Description> <SnippetTypes> <SnippetType>Expansion</SnippetType> <SnippetType>SurroundsWith</SnippetType> </SnippetTypes> </Header> <Snippet> <Declarations> <Literal> <ID>name</ID> <ToolTip>Region name</ToolTip> <Default>MyRegion</Default> </Literal> </Declarations> <Code Language="JavaScript"> <![CDATA[//#region $name$ $selected$$end$ //#endregion $name$]]> </Code> </Snippet> </CodeSnippet>
