Skip to content

Chakaitos/Sublime-Text-2-ERB-Snippets

Repository files navigation

Sublime-Text-2-ERB-Snippets

A collection of Sublime Text snippets useful for writing ERB

##Installation

For OSX

$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone https://github.com/Chakaitos/Sublime-Text-2-ERB-Snippets.git ERB_Snippets

For Windows

$ cd %APPDATA%/Sublime Text 2/Packages/
$ git clone https://github.com/Chakaitos/Sublime-Text-2-ERB-Snippets.git ERB_Snippets

For Linux

$ cd ~/.Sublime Text 2/Packages/
$ git clone https://github.com/Chakaitos/Sublime-Text-2-ERB-Snippets.git ERB_Snippets

##Snippets and Bindings

Snippet Tab Trigger Output
ERB tags __%__ `<% %>`
print ERB tags __%=__ `<%= %>`
print ERB comment __%com__ `<%# %>`
`if` block __%if__ `<% if %>...<% end %>`
`if` / `else` block __%ife__ `<% if %>...<% else %>...<% end %>`
`else` tag __%else__ `<% else %>`
`elsif` tag __%elsif__ `<% elsif %>`
`end` block __%end__ `<% end %>`
`link_to` helper __%lt__ `<%= link_to ..., ... %>`
`form_for` helper __%form__ `<%= form_for(@ ) do |f| %> ... <% end %>`
`t()` helper __%t__ `<%= t('@') %>`

##License

Released under WTFPL, Version 2

About

ERB Snippets for Sublime Text 2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published