Skip to content

Instantly share code, notes, and snippets.

@lucamauri
Created November 12, 2017 21:29
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 lucamauri/9f6872b0044162e3393e54c4374156cf to your computer and use it in GitHub Desktop.
Save lucamauri/9f6872b0044162e3393e54c4374156cf to your computer and use it in GitHub Desktop.
Visual Studio surround widget with comment
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.1.0">
<Header>
<Title>Widget comment</Title>
<Author>Luca Mauri</Author>
<Shortcut>WidComm</Shortcut>
<Description>Wrap a code widget in a customized HTML comment</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>selected</ID>
<ToolTip>content</ToolTip>
<Default>content</Default>
</Literal>
<Literal>
<ID>WidgetName</ID>
<ToolTip>Widget Name</ToolTip>
</Literal>
</Declarations>
<Code Language="html">
<![CDATA[
<!-- $WidgetName$ code BEGIN -->
$selected$
<!-- $WidgetName$ code END -->
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment