I recently upgraded to 4.4 and had a problem getting the syntax coloring to work on my asp files the same as it did in v4.22. The ASP end syntax marker "%>" will not be recognized by TextPad if preceeded by a letter. This is havoc on the eyes when accustomed to reading with wonderful syntax coloring statements such as:
<%If bFound Then%>
..HTML..
<%Else%>
..HTML..
<%End If%>
My asp_vb.syn file header is as follows:
C=1
[Syntax]
Namespace1 =
IgnoreCase = Yes
InitKeyWordChars = A-Za-z!
OperatorChars = +-*/\()&=<>
KeyWordChars = A-Za-z0-9_-
PreprocStart =
SyntaxStart = <%
SyntaxEnd = %>
CommentStart = /*
CommentEnd = */
CommentStartAlt = <!--
CommentEndAlt = -->
SingleComment = '
SingleCommentAlt = //
SingleCommentCol =
StringStart = "
StringEnd = "
At first I thought that changing the "SyntaxEnd = %>" to "SyntaxEnd=%>" would work, but this was not a solution. I love using TextPad, and I like the improvements in v4.4, but for now I have reverted to 4.22 since I don't want to have to add a space in front of all of the %> tags. Is there possibly a solution or workaround that I am not discerning?
-N
ASP syntax coloring
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
RE: ASP syntax coloring
Hmm, I have Textpad 4.4, and the syntax highlighting works fine with or without the spaces in your example. However, I noticed that in Textpad 4.4, the syntax file places the mentioned keywords ("If", "Then", "Else") are in the category Keywords 1, which by default is a dark blue color, close to the default black text. Could it be that the highlighting is working fine, but the dark blue is so close to the black that it is an almost invisible change? If so, you can adjust the color Textpad uses for Keywords 1 in Configure > Preferences > Document Classes > ASP > Color.
If that isn't it, have you tried keeping the SYN file from Textpad 4.22, upgrading to 4.4, then replacing 4.4's with 4.22's? That may help, assuming that the problem isn't Textpad itself using the syntax files differently.
Good luck,
Alan Bellows
Software Developer, Epixtech
If that isn't it, have you tried keeping the SYN file from Textpad 4.22, upgrading to 4.4, then replacing 4.4's with 4.22's? That may help, assuming that the problem isn't Textpad itself using the syntax files differently.
Good luck,
Alan Bellows
Software Developer, Epixtech
RE: ASP syntax coloring
My custom syntax file is the same one from 4.22 becuse I have custom, expanded sets keywords so I can view vb and js code in .asp files. I am most certainly not confusing the colors -- my coloring scheme is quite unique
The only two things in my [Keywords 1] are the lines "<%" and "%>" so that I can make them red with a white background, stark against my normal light gray of the window. I have anything not within the syntax markers as dark gray, and the other keywords blue and purple with red vb comments and light green js and html comments. The main point being that it is really easy for me to spot the code segments amidst the html due to the extreme white backgrounds and color of the <% and %> and the code therein.

RE: ASP syntax coloring
I see the cause of your problem now... having the "<%" and "%>" as both syntax markers AND keywords seems to cause a problem... mine worked fine until I added "<%" and "%>" to the [Keywords 1] section, and that broke it.
It appears that to get the functionality you desire, you'd need to specify them as SytaxStart and SyntaxEnd, and remove them from the Keywords 1 section.
Alan Bellows
Software Developer, Epixtech
It appears that to get the functionality you desire, you'd need to specify them as SytaxStart and SyntaxEnd, and remove them from the Keywords 1 section.
Alan Bellows
Software Developer, Epixtech
RE: ASP syntax coloring
Anything resolution from TextPad support or any other knowledgable parties?