Page 1 of 1

Dashes in keywords

Posted: Tue Jan 22, 2002 7:19 pm
by Andrew
Hi,

I've written a syntax file where some of the keywords have dashes in the middle, e.g. load-if-defined

but only the "if" in "load-if-defined" highlights ("if" is also a keyword).

I noticed the keywordchars syntax option is gone, and I saw in another post that Textpad works out what characters make up keywords from the syntax file. The only time dash is used is in keywords - it's not an operator or anything else.

Is there anything I can do about it?

Re: Dashes in keywords

Posted: Tue Jan 22, 2002 8:26 pm
by Mark Schnitzius
Go to

Configure | Preferences | Document Classes | <your document class> | Syntax | Other characters in words

and add the "-" dash character.

Re: Dashes in keywords

Posted: Wed Aug 13, 2003 11:22 pm
by zillionsofgames
I have the same problem. My language (for scripting game rules) supports dashes in keywords as well. I want to include this in a .syn file so every single user who has TextPad doesn't have to change a setting.

Now, there is a syntax file keyword called "KeyWordChars" that is undocumented in the latest help file. I tried adding "\-" (a dash in a regular expression) to the set of keyword chars, but for some reason this doesn't work.

Is there any way to do this in the .syn file?