need help higlighting rtf syntax
Posted: Thu Nov 25, 2004 9:49 am
Hi,
I'm trying to put together a syntax file for rtf (rich text format). The underlying format of an rtf file is the text of the document it represents mixed in with a bunch of keywords which all start with '\' - no problem so far, except that keywords that require parameters are immediately followed by a numeric value - for instance to select font number 14 you have
\f14
I can't seem to find a way of making this sort of keyword highlight short of actually adding \f14 to my list of keywords (obviously I just want to have \f in the list). How can I stop TextPad from treating the digits 0-9 as a possible part of keywords? Setting
KeyWordChars= a-z\
looked like a promising idea, but doesn't seem to have any effect. Having dug through a few posts here I've made sure that none of my keywords contain any digits as there seems to be an implication that textpad builds an implicit list of keyword characters from the keyword list itself, but that didn't help either.
any ideas?
cheers,
Robin
PS I am using C=1, but aside from that haven't put much else in my [Syntax] section.
I'm trying to put together a syntax file for rtf (rich text format). The underlying format of an rtf file is the text of the document it represents mixed in with a bunch of keywords which all start with '\' - no problem so far, except that keywords that require parameters are immediately followed by a numeric value - for instance to select font number 14 you have
\f14
I can't seem to find a way of making this sort of keyword highlight short of actually adding \f14 to my list of keywords (obviously I just want to have \f in the list). How can I stop TextPad from treating the digits 0-9 as a possible part of keywords? Setting
KeyWordChars= a-z\
looked like a promising idea, but doesn't seem to have any effect. Having dug through a few posts here I've made sure that none of my keywords contain any digits as there seems to be an implication that textpad builds an implicit list of keyword characters from the keyword list itself, but that didn't help either.
any ideas?
cheers,
Robin
PS I am using C=1, but aside from that haven't put much else in my [Syntax] section.