Sublime Forum

TM_SELECTED_TEXT with default value

#1

[code]
<![CDATA[
/**

  • ${1:My Function Description}
  • @return ${2:type} ${3:description}
    */
    function ${TM_SELECTED_TEXT:the default name}() {
    $0
    }
    ]]> myfunc new function

    [/code]

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:

function () {

Did I miss something? Thank you!

0 Likes

#2

Can someone help? Thank you.

0 Likes