Home Download Buy Blog Forum Support

is it possible to make snippets for one file ?

is it possible to make snippets for one file ?

Postby ludo31 on Sun Mar 04, 2012 2:46 pm

I try to create a snippet in sublimetext 2 so I can for one snippet but for a several I can't so I would like to know if it is possible to create all snippets for one file for example those 2 class

Code: Select all
   <snippet>
   <content>
      <![CDATA[

        class ${1:Name_Class} extends CI_Controller
   {

       public function __construct()
       {
            parent::__construct();
         
       }
       
       public function ${2:index}()
       {
           
         
       }
   }
]]>
       </content>
   <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>class_controller</tabTrigger>
   <!-- Optional: Set a scope to limit where the snippet will trigger -->
   <!-- <scope>source.python</scope> -->
</snippet>

<snippet>
   <content>
      <![CDATA[

class ${1:Name_Class} extends CI_Model
   {

       public function __construct()
       {
            parent::__construct();
         
       }
       
       public function ${2:Name_function}()
       {
           
         
       }
   }
]]>
</content>
   <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>class_model</tabTrigger>
   <!-- Optional: Set a scope to limit where the snippet will trigger -->
   <!-- <scope>source.python</scope> -->
</snippet>







the firs class_controller works but not the class model !!
I don't know if it 's necessary to create 1 snippet for 1 file

thanks
ludo31
 
Posts: 11
Joined: Sun Mar 04, 2012 2:44 pm

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 22 guests