wordfile for aspx with c# works perfectly except for...

Syntax highlighting, code folding, brace matching, code indenting, and function list

wordfile for aspx with c# works perfectly except for...

Postby deerchao » Tue Sep 27, 2005 9:05 am

every thing works fine (note: <script runat="server"> must be replaced with <script runat="server" language="c#"> for highlighting and function list), except for that I have to remove original asp with vbscript section, because "aspx_lang" is not defined... a foolish reason, isn't it?
Or, there is a way to improve?

first, make sure your html file extents includes aspx:

/L3"HTML" HTML_LANG Nocase Noquote Block Comment On = <!-- Block Comment Off = --> File Extensions = HTM HTML SHTML HTT HTX CFM JSP PHP PHTML ASP ASPX

then, replace the L10 section (asp with vbscript section) with (tab must be replaced with a real tab character):

/L10"ASPX" ASP_LANG Line Comment = // String Chars = "' Escape Char = \ Block Comment On = /* Block Comment Off = */ File Extensions =
/Delimiters = ~!@%^&*()-+=|\/{}[]:;"'<> ,tab.?
/Function String = "%[a-zA-Z_]*)[~;]"
/Indent Strings = "{"
/Unindent Strings = "}"
/Open Brace Strings = "{" "(" "["
/Close Brace Strings = "}" ")" "]"
/Open Fold Strings = "{" "#region"
/Close Fold Strings = "}" "#endregion"
/C1"Keywords"
as auto
base break
case catch const continue
default do
else event explicit extern
false finally fixed for foreach
goto
if implicit in internal
lock
namespace null
operator out override
params private protected public
readonly ref return
sealed stackalloc static switch
this throw true try
unsafe using
virtual void
while
/C2"C# Data Types"
bool byte
char class
decimal delegate double
enum
float
int interface
long
object
sbyte short string struct
uint ulong ushort
/C3"C# Preprocessor Directives"
#elif #endif #endregion #else #error
#define
#if
#line
#region
#undef
#warning
/C4"Operators"
+
-
*
?
=
// /
%
&
>
<
^
!
|
:
checked
is
new
sizeof
typeof
unchecked
/C5"Tags"
<%
%>
/C6"Objects"
Application
Cache Cookies
ObjectContext
Form
QueryString
Request Response
Server ServerVariables Session


and also, I do wonder about why does ultraedit think the extent ".aspx" has something to do with "asp_lang"?

totally magic!!
User avatar
deerchao
Newbie
 
Posts: 4
Joined: Wed Aug 31, 2005 11:00 pm

Re: wordfile for aspx with c# works perfectly except for...

Postby deerchao » Thu Sep 29, 2005 8:11 am

nobody could give me any help?
User avatar
deerchao
Newbie
 
Posts: 4
Joined: Wed Aug 31, 2005 11:00 pm

ASPX single-quote comment highlighting

Postby Lebear » Sun Feb 12, 2006 2:06 am

I've been wrestling with a way to highlight ONLY comments delimited by a single quote in my ASPX files. However, it always picks up a single quote that exists within a quoted string so that the remainder of the line is highlighted only as a comment. VERY frustrating, and I believe shouldn't be picked up.

However, I got an idea. I often try to add more blocking to my comments, so I start with '*****, possibly even using this to make a box around header comments. So I changed the comment delimiter from a single quote to a single quote and asterisk ('*) This works GREAT!

Related, I also like the function list, but it's difficult to get only what I want on the list. So I add the string fnlist="true" to lines I want to show up in the function list, and viola! They're there!

If you happen to know of a way to ignore single-quotes inside a double-quote delimited string, please post a reply. I searched, but couldn't find anything.

--Lebear
User avatar
Lebear
Newbie
 
Posts: 1
Joined: Sat Feb 11, 2006 12:00 am

Re: ASPX single-quote comment highlighting

Postby Mofi » Thu Sep 07, 2006 10:51 am

Lebear wrote:If you happen to know of a way to ignore single-quotes inside a double-quote delimited string, please post a reply. I searched, but couldn't find anything.


In the language line for ASPX specify String Chars = ". Now only double quoted strings are highlighted as string.

Further you have to specify the characters "*' as delimiters if not already done.

Your special comment style with '* must not be changed.

But if you want also strings with single quotes highlighted as string, highlight it with marker characters:

/Marker Characters = "''"
/C8"Single quoted strings"
''

The color for the group "Single quoted strings" can be either set to the color of strings or you use an other color.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4039
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: wordfile for aspx with c# works perfectly except for...

Postby cfneumann » Fri Apr 06, 2007 2:41 pm

User avatar
cfneumann
Newbie
 
Posts: 1
Joined: Thu Apr 05, 2007 11:00 pm


Return to Syntax Highlighting