[TxMt] Language grammar help

Jon Evans jon.evans at pobox.com
Wed Nov 22 14:13:07 UTC 2006


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

[1]: http://www.plainenglish.co.uk/cliches.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Check for Cliche?s.tmLanguage
Type: application/octet-stream
Size: 1373 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20061122/c23903d4/attachment.tmLanguage>


More information about the textmate mailing list