Home Download Buy Blog Forum Support

TM_SELECTED_TEXT with default value

TM_SELECTED_TEXT with default value

Postby XMLSDK on Sun Sep 11, 2011 2:06 am

Code: Select all
<snippet>
   <content><![CDATA[
/**
* ${1:My Function Description}
*
* @return ${2:type} ${3:description}
*/
function ${TM_SELECTED_TEXT:the default name}() {
   $0
}
]]></content>
   <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
   <tabTrigger>myfunc</tabTrigger>
   <!-- Optional: Set a scope to limit where the snippet will trigger -->
   <!-- <scope>source.python</scope> -->
   <description>new function</description>
</snippet>


I created the above snippet. When I highlighted nothing and triggered this snippet, it did not put the "the default name" string as the function name, leaving empty:

Code: Select all
function () {


Did I miss something? Thank you!
XMLSDK
 
Posts: 2
Joined: Sun Sep 11, 2011 2:02 am

Re: TM_SELECTED_TEXT with default value

Postby XMLSDK on Mon Sep 12, 2011 6:45 pm

Can someone help? Thank you.
XMLSDK
 
Posts: 2
Joined: Sun Sep 11, 2011 2:02 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 21 guests