Hi,
I've thrown together a language grammar for spotting clichés in text (attached). I've based the regexp pattern on the list[1] at the Plain English campaign website. Incidentally, I was prompted to browse the Plain English website when I read this in the latest release notes:
When setting shellVariables as a scope dependent preference, it will eclipse only those settings (with less specific scope selector) that sets a variable also being set by the one with the more specific scope selector.
:-)
I need some advice though, because I've never tried writing a language grammar before:
1) is the scope text.plain the best one to extend? The intention is that this grammar is applied to all English text 2) Can I extend text.plain so my grammar gets used when "Plain Text" is selected in the language selector? At the moment I have to select "Check for Clichés" 3) Is the name of the selector OK? I chose "meta.cliche" 4) I originally tried the selector name "meta.cliché" but the fonts & colours highlighting didn't work with that name. I had to drop the accent. Bug?
Thanks
Jon
On 22 Nov 2006, at 14:13, Jon Evans wrote:
- is the scope text.plain the best one to extend? The intention is
that this grammar is applied to all English text
Probably the scope should be extended to cover html, markdown, and LaTeX. I suspect that most people writing prose in TextMate work in one or another of these formats.
Best, Mark
Mark Eli Kalderon wrote:
On 22 Nov 2006, at 14:13, Jon Evans wrote:
- is the scope text.plain the best one to extend? The intention is
that this grammar is applied to all English text
Probably the scope should be extended to cover html, markdown, and LaTeX. I suspect that most people writing prose in TextMate work in one or another of these formats.
Best, Mark
Once we've got scope injection, that will indeed be the way to go, but for the moment, you probably don't want to add to every grammar that might include prose.
-Jacob
On 22. Nov 2006, at 15:13, Jon Evans wrote:
- Is the name of the selector OK? I chose "meta.cliche"
- I originally tried the selector name "meta.cliché" but the fonts &
colours highlighting didn't work with that name. I had to drop the accent. Bug?
That would be a bug -- only seems to affect the fonts & colors, using it as a scope selector anywhere else, works fine.
Will need to look into that.