views:

449

answers:

1

When writing ERB templates in Ruby on Rails using Textmate formatting by hand pretty much sucks.

Do anyone know of a textmate bundle that handles formatting of ERB templates/views? My googling has found nothing. Thanks!

+1  A: 

I think the best solution is to use the HTML (Rails) bundle. And when you want to tidy something, you'll need to go up to the Bundles menu > HTML > Tidy.

That coupled with Indent Selection ⌥⌘[ , handles most of my reformatting needs.

NOTE: unfortunately, when in the HTML (Rails) bundle, the normal tidy shortcut ⌃⇧H gets overridden and instead launches the "Create a partial from the selected text" when in a *.html.erb file. I'm sure there's a way to change this but it hasn't been a big enough deal for me to investigate.

bndev