Page 1 of 1

Syntax coloring

Posted: Thu Jan 06, 2005 2:35 pm
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

Posted: Thu Jan 06, 2005 3:54 pm
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.

Posted: Sat Jan 08, 2005 2:37 am
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

Posted: Sat Jan 08, 2005 2:39 am
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

Posted: Sat Jan 08, 2005 7:35 am
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