Skip to content

Instantly share code, notes, and snippets.

@krcourville
Last active October 16, 2017 07:19
Show Gist options
  • Select an option

  • Save krcourville/5966257 to your computer and use it in GitHub Desktop.

Select an option

Save krcourville/5966257 to your computer and use it in GitHub Desktop.
Snippet for JavaScript regions. Place in your personal My Snippets folder (Documents/Visual Studio xxxx) or the global folder: \Program Files (x86)\Microsoft Visual Studio xx.x\JavaScript\Snippets\1033\JavaScript
<CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>region</Title>
<Author>Ken Courville</Author>
<Shortcut>try</Shortcut>
<Description>Code snippet for a region statement</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$
//#endregion
]]></Code>
</Snippet>
</CodeSnippet>
@bagherani
Copy link
Copy Markdown

please change the try shortcut to region

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