I've got both a personal MacBook, and a work MacBook pro, each with licensed copies of TextMate.
A few weeks back on my personal machine, I followed the instructions here to get Textmate to detect files ending in _spec.rb as rspec, and just .rb as Ruby on Rails:
http://blog.macromates.com/2007/file-type-detection-rspec-rails/
I've just now tried to do the same thing on the work machine, and while it detects rspec, Normal .rb files are coming up as Ruby rather than Ruby on Rails.
The Ruby On Rails language has fileTypes= { 'rxml', 'rb'} as per the blog post (Yes I realize as I type this I need to make it work with Rails 2.0 conventions).
When went looking in the Ruby language def to delete the file type association to 'rb', there doesn't seem to be one.
Any ideas?
On 3/19/08, Rick DeNatale rick.denatale@gmail.com wrote:
as per the blog post (Yes I realize as I type this I need to make it work with Rails 2.0 conventions).
When went looking in the Ruby language def to delete the file type association to 'rb', there doesn't seem to be one.
Never mind, I guess I just haven't had enough coffee this morning. It WAS in the Ruby language def.
On Mar 19, 2008, at 10:05 AM, Rick DeNatale wrote:
I've got both a personal MacBook, and a work MacBook pro, each with licensed copies of TextMate.
It probably doesn't help now, but just FYI the TextMate license is attached to you the user (not the machine). Thus, you are allowed to use it on multiple machines.
Normal .rb files are coming up as Ruby rather than Ruby on Rails.
Just open a .rb file and switch the language menu at the bottom of the window to Ruby on Rails. TextMate needs the hint to know you want to use the Rails grammar, but after you tell it once it will remember.
James Edward Gray II
On 3/19/08, James Gray james@grayproductions.net wrote:
On Mar 19, 2008, at 10:05 AM, Rick DeNatale wrote:
I've got both a personal MacBook, and a work MacBook pro, each with licensed copies of TextMate.
It probably doesn't help now, but just FYI the TextMate license is attached to you the user (not the machine). Thus, you are allowed to use it on multiple machines.
Normal .rb files are coming up as Ruby rather than Ruby on Rails.
Just open a .rb file and switch the language menu at the bottom of the window to Ruby on Rails. TextMate needs the hint to know you want to use the Rails grammar, but after you tell it once it will remember.
I know, but the problem is that when you make a manual association, then any file ending in .rb will be treated that way, overriding anything in the language definitions in bundles.
The RSpec bundle has a language file which recognizes files ending in _spec.rb as being rspec(ruby) files. Alan's article describes how to set things up so that this works by giving the Language specification in the Ruby on Rails bundle preference over the just plain Ruby language.
Yes it means that if I'm editing a ruby file which isn't part of a rails app, I get some stuff which I don't really need, but I can live with that until Textmate supports somewhat smarter language detection which might take the project and maybe even the file path into account.
And as I said, I did find the fileType in the Ruby language in the Ruby Bundle, so it's all working the same way on both machines.
On Mar 19, 2008, at 4:02 PM, Rick DeNatale wrote:
On 3/19/08, James Gray james@grayproductions.net wrote:
On Mar 19, 2008, at 10:05 AM, Rick DeNatale wrote:
I've got both a personal MacBook, and a work MacBook pro, each with licensed copies of TextMate.
It probably doesn't help now, but just FYI the TextMate license is attached to you the user (not the machine). Thus, you are allowed to use it on multiple machines.
Normal .rb files are coming up as Ruby rather than Ruby on Rails.
Just open a .rb file and switch the language menu at the bottom of the window to Ruby on Rails. TextMate needs the hint to know you want to use the Rails grammar, but after you tell it once it will remember.
I know, but the problem is that when you make a manual association, then any file ending in .rb will be treated that way, overriding anything in the language definitions in bundles.
Ah, I didn't read carefully enough. My mistake.
James Edward Gray II