Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Mustache.tmbundle
@ddlsmurf

This comment has been minimized.

Copy link

ddlsmurf commented Aug 23, 2010

Thanks for the textmate bundle. I have added the following snippet that I find too usefull not to share. I bind to tab expand of {:

{{${1:#${2:tag}}}${1/^([\#\^])?(.*)$/(?1:})/}${3}${1/^([\#\^])?(.*)$/(?1:{{\/$2})/}

edit: formatting

@wjhrdy

This comment has been minimized.

Copy link

wjhrdy commented Jul 3, 2012

<snippet>
  <content><![CDATA[
    {{${1:#${2:tag}}}${1/^([#^])?(.*)$/(?1:})/}${3}${1/^([#^])?(.*)$/(?1:{{\/$2})/}
]]></content>
  <tabTrigger>{</tabTrigger>
</snippet>

that works for sublime text 2
you were missing a * after the . in the regular expression

@ddlsmurf

This comment has been minimized.

Copy link

ddlsmurf commented Jul 4, 2012

thanks, got caught by the markdown thing

@diniremix

This comment has been minimized.

Copy link

diniremix commented Dec 5, 2012

wjhrdy In SublimeText 2 works very well, but he needed a } and the tabTrigger "{" not work, I changed the word "tag"

I have a repo to develop snippets and others, thank you very much.

@bobrocke

This comment has been minimized.

Copy link

bobrocke commented Jul 24, 2013

Thank you. But I see that syntax for the form src="{{LexieFile}}" get's no syntax coloring. It seems as if the "" mess it up. True? Is there a way around that?

Bob

@axelspeedy

This comment has been minimized.

Copy link

axelspeedy commented Jun 21, 2017

--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.