Textmate Ruby on Rails 突出显示
我的 leopard 机器上运行的是 Textmate 1.5.7。
在 Rails 中编程时,由于某种原因,某些关键字不会突出显示。 例如: validates_presence_of
、has_many
、remote_form_for
(form_for
突出显示)等...
我尝试切换主题并但这没有帮助。 我还尝试升级到最新的rails捆绑包,但没有雪茄。 有人可以帮忙吗?
I have Textmate 1.5.7 running on my leopard machine.
When programming in rails, for some reason some key words do not get highlighted.
For example: validates_presence_of
, has_many
, remote_form_for
(form_for
gets highlighted) etc...
I tried switching themes and it did not help. I also tried upgrading to the most recent rails bundle but no cigar. Could someone please help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 RubyOnRails 作为您的语言而不是 Ruby
Use RubyOnRails as your language rather than Ruby
如果您正在编辑
.erb
文件等视图,您需要选择 HTML (Rails),以便正确突出显示remote_form_for
等。 对于 @Omar 指出的其他所有内容(控制器、模型、迁移等),请确保您选择了 Ruby on Rails。If you're editing views like
.erb
files you'll want to select HTML (Rails) so theremote_form_for
, etc. get properly highlighted. For everything else (controllers, models, migrations, etc.) like @Omar points out, make sure you've got Ruby on Rails selected.对于其他潜伏者来说,这是一个简短的说明 - 我花了一些时间才弄清楚如何更改 TextMate 上的语言。 您可以通过捆绑编辑器来完成此操作,它也会向您显示快捷方式...
Just a quick note for other lurkers -- it took me a little while to figure out how to change languages on TextMate. You can do it through the Bundle Editor, which will show you the shortcut as well...