Page 1 of 1

Syntax highlighting won't find hyphenated keywords

Posted: Thu Sep 19, 2013 8:00 pm
by melvers
Does anyone know how to make the syntax highlighting find keywords with hyphens in them. I have some keywords like Font-Bold. I enter them into a syntax file, but those terms do net get highlighted (colored text) even though all the non-hyphenated keywords do.

Posted: Thu Sep 19, 2013 10:00 pm
by MudGuard
Go to

Configure
Preferences
Document Classes
<your document class>
Syntax

add hyphen to field "Other characters in words"

Syntax highlighting won't find hyphenated keywords

Posted: Fri Sep 20, 2013 12:44 pm
by melvers
The problem with that is it makes the hyphen part of all words, which I don't want. I just want the syntax highlighting to match the keyword as entered (case-insensitive in this case). Since I am providing the explicit keywords, it shouldn't be using any word matching rules other than 'is this the same sequence of characters'.