简体   繁体   English

Textmate Ruby on Rails突出显示

[英]Textmate Ruby on Rails Highlighting

I have Textmate 1.5.7 running on my leopard machine. 我的豹子计算机上运行的是Textmate 1.5.7。

When programming in rails, for some reason some key words do not get highlighted. 在Rails中编程时,由于某些原因,某些关键字不会突出显示。 For example: validates_presence_of , has_many , remote_form_for ( form_for gets highlighted) etc... 例如: validates_presence_ofhas_manyremote_form_forform_for突出显示)等...

I tried switching themes and it did not help. 我尝试切换主题,但没有帮助。 I also tried upgrading to the most recent rails bundle but no cigar. 我还尝试了升级到最新的Rails Bundle,但没有雪茄。 Could someone please help? 有人可以帮忙吗?

使用RubyOnRails作为语言而不是Ruby

If you're editing views like .erb files you'll want to select HTML (Rails) so the remote_form_for , etc. get properly highlighted. 如果您正在编辑.erb文件之类的.erb需要选择HTML(Rails),以便remote_form_for等正确突出显示。 For everything else (controllers, models, migrations, etc.) like @Omar points out, make sure you've got Ruby on Rails selected. 对于@Omar指出的所有其他内容(控制器,模型,迁移等),请确保已选择Ruby on Rails

Just a quick note for other lurkers -- it took me a little while to figure out how to change languages on TextMate. 只是对其他潜伏者的简要说明-我花了一些时间才弄清楚如何在TextMate上更改语言。 You can do it through the Bundle Editor, which will show you the shortcut as well... 您可以通过Bundle Editor进行编辑,该编辑器还将向您显示快捷方式...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM