Home Download Buy Blog Forum Support

Snippets help

Snippets help

Postby bizoo on Wed Jul 10, 2013 3:28 pm

(Sorry for the long post)
A question for the snippets guru.

I have this snippet:
Code: Select all
<snippet>
   <content><![CDATA[
{BEGIN}
//$0
$SELECTION
{END}
]]></content>
   <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
   <tabTrigger></tabTrigger>
   <!-- Optional: Set a scope to limit where the snippet will trigger -->
   <scope></scope>
</snippet>


And this code:
Code: Select all
class
   1
   2
   a


I want to select the line containing 1 and 2 and wrap it with my snippet:
Code: Select all
class
   {BEGIN}
   //
   1
   2
   {END}
   a


But currently the result is this:
Code: Select all
class
   {BEGIN}
   //
   1
      2
   {END}
   a

The indentation of the second line is wrong.
It works if I select only 1 line.

Is this possible to do what I want with snippets ?

Thanks for your help.
bizoo
 
Posts: 889
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Return to Technical Support

Who is online

Users browsing this forum: DavidCheshire and 24 guests