Syntax coloring

General questions about using TextPad

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

Post Reply
victorf
Posts: 12
Joined: Fri Nov 14, 2003 12:46 pm
Location: Schehectady, New York USA

Syntax coloring

Post by victorf »

I am using PICmicroASM.syn as the syntax file and I have it in the USER folder where my other .syn files are stored. I am using TP 4.7.2 and have been a user for quite a few years. I am unable to get the systax coloring to work even though I have enabled that in the preferences. I also have a .syn for my pascal editing and the color works with my .pas files. What is going on?

Any enlightenment will be appreciated.

Vic Fraenckel
Victor Fraenckel
victorf AT windreader DOT com
KC2GUI
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

is the file you edit really in the document class you expect it to be in?

There is afaik no direct way to check which document class a file is in, but have a look at
View - Document Properties - Syntax
and look what it says there.

You could also check under Configure - Preferences - Document classes.
Click on the Class names - starting from the last class. On the righthand side of the dialog there is a list of file wildcards which are in the document class.
If you find a matching file wildcard for your file before you reached the appropriate document class you know why syntax coloring does not work.
victorf
Posts: 12
Joined: Fri Nov 14, 2003 12:46 pm
Location: Schehectady, New York USA

Post by victorf »

MudGuard;

I did all that you suggested with no results. I have been trying things to try and solve the problem. The file type I want to edit is set to *.asm and in this file type the comments are denoted by the semicolon (;) all that follows one is a comment. I set the comment color to red and checked the .syn file, PICmicroASM, the CommentStart is set to ; and CommentEnd is set to nothing. A test file shows the semicolon red but nothing following it is red though.

I must admit I am stumped. Any thoughts?

Vic
Victor Fraenckel
victorf AT windreader DOT com
KC2GUI
victorf
Posts: 12
Joined: Fri Nov 14, 2003 12:46 pm
Location: Schehectady, New York USA

Post by victorf »

MudGuard;

I did all that you suggested with no results. I have been trying things to try and solve the problem. The file type I want to edit is set to *.asm and in this file type the comments are denoted by the semicolon (;) all that follows one is a comment. I set the comment color to red and checked the .syn file, PICmicroASM, the CommentStart is set to ; and CommentEnd is set to nothing. A test file shows the semicolon red but nothing following it is red though.

I must admit I am stumped. Any thoughts?

Vic
Victor Fraenckel
victorf AT windreader DOT com
KC2GUI
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

AFAIK comments that start on a character (or character combination) and end with the line break should be defined per

SingleComment ;
or
SingleCommentAlt ;

not with CommentStart/CommentEnd or CommentStartAlt/CommentEndAlt
Post Reply