Code Snippet, Selected Text...

JaedenRuiner

Well-known member
Joined
Aug 13, 2007
Messages
340
Programming Experience
10+
I've started playing with the Code Snippets and have finally gotten around to coding some of my "templates" for setting things up to save on typing, but i'm having a problem with the "selected" text.

VB.NET:
<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>MyRegion</Title>
      <Author>Me</Author>
      <Shortcut>freg</Shortcut>
      <Description>Creates a Main Scope Region encapsulating the Selected Text</Description>
      <SnippetTypes>
        <SnippetType>SurroundsWith</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>title</ID>
          <Default>MyNewRegion</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="any">
        <![CDATA[#Region "-------------::< $title$ >::-------------"
  $selected$ $end$
#End Region]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

I've tried this in so many different ways, but every time i run it, it replaces the selected text instead of "Surrounding" it like the documentation says it should.

I'm using VB Express 2008, so that might be it, but I don't know.

Thanks
 
Back
Top