[SVN] Re: r10238 (ColdFusion)
Daniel Stockman
daniel.stockman at gmail.com
Fri Jul 11 18:15:49 UTC 2008
Over the past few years or so I've collected my homegrown hacks of the
CF bundle, now hosted on GitHub:
http://github.com/evocateur/coldfusion-tmbundle/tree/master
Among other things, it deals with many of the issues addressed in this
patch, but in a somewhat more elegant and useful manner.
> - cfscript has js highlighting
For the most part, yes, with a number of weird-looking operators such
as "EQ", "IS", "NEQ", "GTE", etc. I found it much easier to extract
the CFscript stuff into an included grammar, which is a rough copy of
js.basic, for the most part (this avoids a bunch of invalid JS method
names etc).
> - cfscript/cfquery/cfoutput has cffunction/custom function scoping
> between the tags
> - all cftags are highlightable
Not all tags that start with "cf" are valid tags, however. I find it
more useful to only highlight valid tags, since there are such a
profusion of similarly-named tags.
> - all cftags have cffunction/custom fucntion highlighting
> - broke cffunctions/custom into its one includable module (makeing
> it work in cfscript)
I don't see the coldfusion-script repository item anywhere, and there
seems to be an error in the language grammar, inside the
meta.tag.cfscript patterns block, referring incorrectly to 'cfoutput'
as the ending lookahead.
Using an included grammar here (I call it 'source.cfml') seems cleaner.
> - tag highlighting between cfoutput tags
> - cftags can now be multiline
Using the HTML-like syntax, you can't have multiline CF tags _and_
preserve folding (e.g., cffunction declarations). I was able to
accomplish multi-line folding inside CFC files by copying a bit of the
XML syntax into a wrapper grammar, "HTML (CFC)". It requires XML-
formatted CFML to avoid folding mania (self-closing empty tags,
mostly), however.
> Known bugs:
> - Need to only highlight cffunctions in a cfoutput that are wrapped
> in # otherwise it shouldn't highlight, unless its inside a tag
> inside a cfoutput.
> - There is something wrong with the first cfscript not scoping
> correctly
Both of these issues are fixed in my bundle. The #-matching is a bit
wiggly, but it works (and is good at highlighting places you forgot to
close them, which causes errors).
I haven't gotten around to copying Ciaran's work on the PHP bundle w/r/
t autocomplete w/ arguments and such, but my god the ginormous list of
inept snippets reeks. You'll notice their absence from my fork.
Regards,
Daniel
More information about the textmate-dev
mailing list