Hi,
I am slowly getting to grips with a syntax file and have applied it in several situations, but I would like to highlight strings of words i.e.
In a document I have that contains
unspecified error
error
unspecified
and I want
unspecified error
error
unspecified
I don't want to highlight just unspecified or error, I want to highlight both when they appear together.
Is this possible ? if so how whats the syntax ?
Thanks
Paul
syntax file highlight a string
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
I too have wanted a way to highlight multiple words using a single entry in my syntax files.Bob Hansen wrote:Unfortunately, string highlighting is limited to words.
Can you use unspecified_error?
Does the underscore act as a wildcard?
A wildcard is something I've wanted with TextPad syntax files. For example, instead of defining the following 3 definitions:
AUTBAT01I
AUTHSC01I
AUTTMS01I
It would be great if I could define a single definition using something like:
AUT***01I
Or if the underscore does work as a wildcard character, a single definition such as the following would do the trick:
AUT___01I
Otherwise, TextPad is the best editor I have ever used.
I see there has been a similar response in topic 8598: http://forums.textpad.com/viewtopic.php?t=8598. In my syntax file that views log files after compilation, I have SingleCommentColAlt set to "Warning." I then set comments to blue. This highlights all lines that begin with that word. I'd like to set "SingleCommentColAlt" to "Note: Missing" but there is a space in that string.
Can I put a %20 or a 32d literal in place of the space? Is there some kludge that will make Textpad think two words are really one?
Any suggestions would be appreciated.
An everyday TextPad user.
Can I put a %20 or a 32d literal in place of the space? Is there some kludge that will make Textpad think two words are really one?
Any suggestions would be appreciated.
An everyday TextPad user.
FWIW, I too would appreciate such a facility.
I have written a syntax file for some logs that my software creates and, whilst it is great to be able to use the limited colour highlighting available, it would be a major advantage to have greater control.
IMHO, extensive and open flexibility of configuration has always marked the great and useful programmes from the run-of-the-mill. Extension of the .syn files are an opourtunity here.
I have written a syntax file for some logs that my software creates and, whilst it is great to be able to use the limited colour highlighting available, it would be a major advantage to have greater control.
IMHO, extensive and open flexibility of configuration has always marked the great and useful programmes from the run-of-the-mill. Extension of the .syn files are an opourtunity here.