Syntax file color formatting

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
Jan Paul
Posts: 21
Joined: Mon Apr 28, 2003 1:24 pm
Location: The Netherlands

Syntax file color formatting

Post by Jan Paul »

Hi,

I have another syntax file formatting question.
I am using 4dos syntax, but I cannot seem to get the coloring right in regard with a character right after the keyword.

SET TEST=%@INIWRITE[]
The %@INIWRITE does not get colored.

when I only use
SET TEST=%@INIWRITE
The %@INIWRITE does get colored.

Any suggestions?

Here is the syntax files (not all of it):
C=1

[Syntax]
Namespace1=6
BracketChars={}()[]
OperatorChars=<>^+-=:.,"'&|
SingleComment=REM
SingleCommentCol=Leading
IgnoreCase=Yes
InitKeyWordChars = A-Za-z0-9_
KeyWordChars = A-Za-z0-9_

[Keywords 2]
%@INIWRITE

Thanks,
Jan Paul
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

You probably have [ in a word in the syntax file. This causes TextPad to consider [ as part of the word when highlighting

I tried the syntax file you supplied with the text you supplied and it worked OK I then added a keyword nbvjuy[] - this caused it not to highlight

Do you need [ in another keyword?

It may help to post the whole syntax file
User avatar
Jan Paul
Posts: 21
Joined: Mon Apr 28, 2003 1:24 pm
Location: The Netherlands

Post by Jan Paul »

Hi Ed,

Yes I had a %@EMS[ in stead of %@EMS in the syntax file.
Ofcourse the [ was en error there.
I have removed it and voila: all coloring worked ok.

Thanks,
Jan Paul
Post Reply