title: how can i make a "Surround" type Delphi Template?
body: <p>i'm migrating my app to delphi 2009.  my app must still use a lot of AnsiString.  during migration, i find myself always converting:</p>
  
  <pre><code>abc := def;
  </code></pre>
  
  <p>into:</p>
  
  <pre><code>abc := string(def);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>abc := TDeviceAnsiString(def);
  </code></pre>
  
  <p>i know i should be able to do this with templates but i find templates--although powerful--are not so easy to get working.  here's what i've been trying:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  
  &lt;codetemplate   xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
                  version="1.0.0"&gt;
      &lt;template name="das" invoke="auto"&gt;
          &lt;point name="expr"&gt;
              &lt;script language="Delphi"&gt;
                  InvokeCodeCompletion;
              &lt;/script&gt;
              &lt;hint&gt;
                  MP: TDeviceAnsiString
              &lt;/hint&gt;
              &lt;text&gt;
                  True
              &lt;/text&gt;
          &lt;/point&gt;
          &lt;description&gt;
              MP: TDeviceAnsiString
          &lt;/description&gt;
          &lt;author&gt;
              Mike
          &lt;/author&gt;
          &lt;code language="Delphi" context="any" delimiter="|"&gt;&lt;![CDATA[TDeviceAnsiString(|selected|)|end|]]&gt;
          &lt;/code&gt;
      &lt;/template&gt;
  &lt;/codetemplate&gt;
  </code></pre>
  
  <p>it doesn't appear in the Surround menu and it doesn't activate whenever i want.  i'd like to be able to </p>
  
  <pre><code>abc := **das***[tab]*def;
  </code></pre>
  
  <p>or select the "def" and use "surround" to get:</p>
  
  <pre><code>abc := TDeviceAnsiString(def);
  </code></pre>
  
  <p>thank you for your help!</p>