[TxMt] syntax tool
Chris Thomas
chris at cjack.com
Mon Jan 17 06:05:29 UTC 2005
On Jan 15, 2005, at 11:42 PM, Eric Hsu wrote:
>> The whole syntax highlighting thing is going to be overhauled, so in
>> my
>> opinion, it will be a bit a waste of time... The SH files will all
>> have
>> to be re-written or updated soon, so I don't see the need to do it
>> twice or more, but if you've got lots of time on your hands, go for it
>> ;)
>>
> Ah, you must not have any major projects to procrastinate from... :)
Also, the classification/standardization work will need to be done
anyway, and there's no reason it must be done at the same time as the
CSS-style syntax rewrite. I don't see this work as wasted at all -- it
may simplify conversion to the new syntax (or it may not).
> So, to put my money where my mouth is, I tried out Chris Thomas's
> hierarchical scheme with the Perl.tmbundle just to see how hard it
> would be. It actually didn't take very long; the main issue was
> deciding where in the hierarchy things should go, like variables and
> functions. Things that were unlikely to have an analog in another
> language (like POD) I put in a hierarchy beneath *.perl.
>
> I also renamed the Latex innards. It was a little harder, as it's not
> really a programming language, but I took a shot at it.
Awesome!
[snip]
> comments.line.perl
> comments.perl.POD
Maybe "comments.block.embedded-docs"? Ruby has embedded documentation
very much like POD. It permits the same style of unconditionally
commenting out blocks of text, using =begin and =end instead of =pod
and =cut. (Maybe JavaDoc could live under that class as well.)
> keywords.control.perl
> keywords.functions.perl
> keywords.functions.perl.arrows
> keywords.functions.perl.comparison
> keywords.functions.perl.filetest
I've used perl very little, but would these latter three be better as
"keywords.operators.*?" (That is, would it be better to select on these
in the color prefs UI as "keywords.operators.*"?
> keywords.variables.perl
> keywords.variables.perl.#
> keywords.variables.perl.special
> keywords.variables.perl.special#
> strings.backticked.perl
> strings.double-quoted.perl
> strings.double-quoted.perl.q
> strings.double-quoted.perl.qlinestart
Ruby has a very similar construct (where ruby %Q() == perl qq()). I'm
not sure what to call it, though.
In any case, I'm inspired by your example. I'm off to update the C
bundle.
Chris
> strings.program-block.perl
> strings.regexp.perl
> strings.single-quoted.perl
>
> comments.line.latex
> keywords.functions.latex
> keywords.functions.latex.citations
> keywords.functions.latex.sections
> keywords.latex.braces
> strings.latex.equation-$
> strings.latex.equation-$$
> strings.latex.equation-braces
>
More information about the textmate
mailing list