Skip to content

Instantly share code, notes, and snippets.

@krypton
Last active December 12, 2015 01:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save krypton/4692871 to your computer and use it in GitHub Desktop.
Save krypton/4692871 to your computer and use it in GitHub Desktop.
Sublime Text 2 snippet to create ERB tag
<!--
Inspired on Dr.Nic ruby-tmbundle (https://github.com/drnic/ruby-tmbundle/blob/master/Snippets/Insert%20ERb's%20%3C%25%20__%20%25%3E%20or%20%3C%25%3D%20__%20%25%3E.tmSnippet)
In your Sublime Text 2 User folder (Sublime Text 2/Packages/User), create this file and give a name "erb.sublime-snippet".
Than open a Ruby on Rails view file like HAML or ERB, type "erb" command and tab key.
This create ERB tag on your view file.
-->
<snippet>
<content><![CDATA[<%= ${0} %>]]></content>
<tabTrigger>erb</tabTrigger>
<scope>text.html.ruby, text.haml</scope>
<description>erb</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment