A collection of Sublime Text snippets useful for writing ERB
##Installation
Simple checkout the source code into Sublime Text's packages directory. The location is system specific:
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone git://github.com/matthewrobertson/ERB-Sublime-Snippets.git ERB_Snipptes
$ cd %APPDATA%/Sublime Text 2/Packages/
$ git clone git://github.com/matthewrobertson/ERB-Sublime-Snippets.git ERB_Snipptes
$ cd ~/.Sublime Text 2/Packages/
$ git clone git://github.com/matthewrobertson/ERB-Sublime-Snippets.git ERB_Snipptes
##Snippets and Bindings
Snippet | Tab Trigger | Output |
---|---|---|
ERB tags | __er__ | `<% %>` |
print ERB tags | __pe__ | `<%= %>` |
`if` block | __if__ | `<% if %>...<% end %>` |
`if` / `else` block | __ife__ | `<% if %>...<% else %>...<% end %>` |
`end` block | __end__ | `<% end %>` |
`link_to` helper | __lt__ | `<%= link_to ..., ... %>` |
##License
Released under WTFPL, Version 2