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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With