sublimetext2 - Sublime Text 2: Embed snippets inside snippets -


i have been looking on 40 minutes information embedding snippets inside snippets using sublime text 2

i want like

<snippet>     <content> <![cdata[header content here]]> </content>     <tabtrigger>header</tabtrigger>     <scope>source.php</scope>     <description>function</description> </snippet> 

above header snippet embed inside below, content snippet

<snippet>     <content> <![cdata[      ${trigger:header}      content body goes here      ]]> </content>     <tabtrigger>content</tabtrigger>     <scope>source.php</scope>     <description>function</description> </snippet> 

if there nothing out there already, know how can add

${trigger:<tabtrigger>} 

command existing snippet functionality creating extension or plugin...

any ideas, links how can add ${trigger:} command, or links existing plugin this, appreciated!

thank you! - jeff

don't think possible. can have same trigger multiple snippets (don't ask why, i'm saying can), it's not you can reference.

i can think of few solutions though. of them suboptimal, i'll list them anyways. perhaps 1 of them give idea.

  1. set things can manually enter snippets (or other autocompletions) snippet body.
  2. insert content first snippet second.
  3. write/find plugin it. don't know of off top of head though can't specific. if think of though, i'll update answer.

Comments