Color Syntax Problems

General questions about using TextPad

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

Post Reply
arpan_de
Posts: 3
Joined: Sun Sep 28, 2003 6:41 pm

Color Syntax Problems

Post by arpan_de »

Currently I am working With TextPad 5.0.3 & all my syntax definition files (*.syn) reside in D:\Program Files\TextPad 5\Samples. Even the path of the syntax definition folder (under Configure-->Preferences-->Folders-->Syntax) has been set to D:\Program Files\TextPad 5\Samples.

For ASP files, I am using a syntax definition file named asp.syn. Recently I added a few keywords in asp.syn which weren't present earlier like for e.g. With but strangely TextPad doesn't highlight the newly added keywords.

I even navigated to Configure-->Preferences-->Document Classes-->ASP-->Syntax & changed the syntax definition file to cpp.syn but when I closed TextPad & re-opened TextPad, the keywords in the ASP files should have been highlighted as per cpp.syn but the keywords still adhered to asp.syn! Even if I uncheck the Enable syntax highlighting checkbox for the ASP document class, then ASP files still maintain the syntax color as per asp.syn! Note that I deleted *.ASP from the list of Files in class HTML in the HTML document class.

So irrespective of whether I enable/disable syntax highlighting for the ASP document class or set the syntax definition file for the ASP document class to some syntax definition file other than asp.syn, the keywords in ASP files ALWAYS remain highlighted according to asp.syn. At the same time, any newly added keywords which I add in asp.syn (like With) refuse to highlight.

What could be going wrong? Can someone please give me some idea on how do I overcome this issue?

I have been using TextPad for quite some time now but this is the first time I am encountering such eccentricities!

Thanks,

Arpan
Cringing Dragon
Posts: 7
Joined: Fri May 04, 2007 11:39 pm

Post by Cringing Dragon »

Apologies if I'm stating the obvious, but a couple of things come to mind that might cause this and sometimes the simple things get overlooked.

Have you checked all your other document classes to make sure that the asp.syn class is the only one that has *.asp (or whatever the file extension is) in the class? It could be that the extension is included in another document class, so that it's not asp.syn being used.

Check the colours (sorry "colors") in the document class - on my PC the default colour for keywords 3-6 was such a dark blue that the text looked black on the screen, so it looked like it wasn't highlighting those keywords until I changed the colours.

Another possibility occurs to me after having spent most of the morning reading through the forum looking for solutions to my own syntax issues. Are you using a workspace? Many of the posts on this forum mention a problem with workspaces in that it appears that they don't refresh their syntax definitions - they use whatever was current when they were saved. Try opening the files without using a workspace.

Have fun.
Post Reply