Skip to content

jeff-free/ERB-Sublime-Snippets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERB-Sublime-Snippets

This repo is fork from git://github.com/matthewrobertson/ERB-Sublime-Snippets.git for personal erb syntax, like <%= link_to(, )%> instead of <%= link_to , >, which is the convension from master XDite master Yung.

For OSX

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

For Windows

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

For Linux

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

##Snippets and Bindings

Snippet Tab Trigger Output
ERB tags __er__ `<% %>`
print ERB tags __pe__ `<%= %>`
print ERB comment __pc__ `<%# %>`
`if` block __if__ `<% if %>...<% end %>`
`if` / `else` block __ife__ `<% if %>...<% else %>...<% end %>`
`else` tag __else__ `<% else %>`
`elsif` tag __elsif__ `<% elsif %>`
`unless` block __unless__ `<% unless %>...<% end %>`
`end` block __end__ `<% end %>`
`submit_tag` helper __st__ `<%= submit_tag ..., ... %>`
`text_field_tag` helper __tft__ `<%= text_field_tag ..., ... %>`
`password_field_tag` helper __pft__ `<%= password_field_tag ..., ... %>`
`label_tag` helper __lblt__ `<%= label_tag ..., ... %>`
`link_to` helper __lt__ `<%= link_to (, ) %>`
`form_for` helper __form__ `<%= form_for(@ ) do |f| %> ... <% end %>`
`t()` helper __t__ `<%= t('@') %>`

##Questions, Comments, Concerns?

Feel free to submit a pull request with any snippets you would like to add to the project. If you have any problems or suggestions you can contact me on twitter.

##License

Released under WTFPL, Version 2

About

A collection of sublime text snippets useful for coding ERB templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published