在 Ruby on Rails 中使用 Textmate 格式手动编写 ERB 模板时非常糟糕。
有谁知道处理 ERB 模板/视图格式的 textmate 包?我的谷歌搜索一无所获。谢谢!
在 Ruby on Rails 中使用 Textmate 格式手动编写 ERB 模板时非常糟糕。
有谁知道处理 ERB 模板/视图格式的 textmate 包?我的谷歌搜索一无所获。谢谢!
我认为最好的解决方案是使用 HTML (Rails) 包。当你想整理一些东西时,你需要进入 Bundles 菜单 > HTML > Tidy。
再加上缩进选择(⌘</kbd>-⌥</kbd>-[) , handles most of my reformatting needs.
注意:不幸的是,当在 HTML (Rails) 包中时,正常的 tidy 快捷方式⌃</kbd>-⇧</kbd>-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.