[SVN] Bundle commit 530
Allan Odgaard
allan at macromates.com
Fri Mar 25 18:12:16 UTC 2005
On Mar 24, 2005, at 18:00, Torsten Becker wrote:
> Currently there is only one problem left with the .rhtml files.
> Because the default Ruby syntax doesn't include the Rails methods they
> are not colored. Also not if I choose Ruby on Rails to be my handler
> for .rb (it claims to be mode-Ruby, BTW). It would be nice if TM
> could remember it if I choose another Syntax to handle mode-Ruby and
> handle the pattern inclusion in Syntax files this way. (This is a
> feature Request :) )
Just for the records, the mode-stuff is obsolete. It was when I did
mode-dependent-loopkup in 1.1b1, in the future the status bar will just
show the name of the syntax file (yes, as a popup :) ).
With regard to the request, if I understand correctly, you want
TextMate to know that 'source.ruby' should be handled with the Rails
syntax, and when you have an RHTML file, which does include
'source.ruby', it shouldn't use the Ruby syntax (as it would normally
do), but the Rails syntax instead, so that you do not need two syntax
files for .rhtml (one with and one without the Rails stuff)?
I don't really see any easy way to add this, I have however considered
having the ability to apply several syntax files to the current
document for two reasons, 1) to enable different frameworks (like with
Ruby as base and Rails as additional framework) and 2) because behavior
can now be dependent on context, it may be useful to have some patterns
that just catch general stuff not really language-specific.
Though this wouldn't really help you, since it's only inside <% ... %>
you'd want to add/apply additional syntax files -- but since TM is now
pretty sensitive to context, I may figure out a way to do it -- but let
me think some more about it. It does currently strike me as overly
complex, just to avoid a wrapper file that does the proper includes.
More information about the textmate-dev
mailing list