Textmate's ability to write a new grammar which includes an existing one is nice, but I'd like to do the opposite: make all existing grammars include an extension...
I frequently use "structured comments", such as comments beginning with "TODO:" to note bits of code that I've only stubbed out, or "OPT:" for optimization opportunities. I'd like to be able to syntax- highlight the most severe of these types of comments so that I always notice these things as I'm scanning through a file.
I could just extend the grammar for each programming language with a few new rules, but a much much better solution would be to add the rules everywhere, such that anything within a "comment" scope and which matched my rule got an additional "todo" scope.
Does Textmate already have a simple way to do this?
Is there a better approach to accomplish what I'm looking for?
On Feb 4, 2007, at 8:55 AM, Rob Shearer wrote:
Does Textmate already have a simple way to do this?
No I'm afraid not, AFAIK.
Is there a better approach to accomplish what I'm looking for?
Have a look at the TODO bundle, it might offer at least a decent way to manage these comments.
Haris
Rob Shearer <textmate <at> v.cx> writes:
[...] I'd like to do the opposite: make all existing grammars include an extension...
Does Textmate already have a simple way to do this?
Is there a better approach to accomplish what I'm looking for?
No, it's not possible. Allan has dropped hints about functionality like this for version 2.0, which should come in a few months.
-Jacob