Skip to content

Instantly share code, notes, and snippets.

@knomedia
Created August 14, 2012 15:55
Show Gist options
  • Save knomedia/3350459 to your computer and use it in GitHub Desktop.
Save knomedia/3350459 to your computer and use it in GitHub Desktop.
ERB Sublime Text 2 snippets
<snippet>
<content><![CDATA[<% ${1:@Items}.each do |${2:item}| %>
$3
<% end %>
$0]]></content>
<!-- Optional: Tab trigger to activate the snippet -->
<tabTrigger>each</tabTrigger>
<!-- Optional: Scope the tab trigger will be active in -->
<scope>text.html.ruby</scope>
<!-- Optional: Description to show in the menu -->
<description>ERB Each Loop</description>
</snippet>
<snippet>
<content><![CDATA[<%${1:=} $2 %>$0]]></content>
<!-- Optional: Tab trigger to activate the snippet -->
<tabTrigger>e</tabTrigger>
<!-- Optional: Scope the tab trigger will be active in -->
<scope>text.html.ruby</scope>
<!-- Optional: Description to show in the menu -->
<description>ERB Eval</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment