Topic: Active Server Pages (ASP, JSP, PSP) (1 of 3), Read 88 times
Conf: Program develop.,Color syntax
From: David Radcliffe
Date: Thursday, February 06, 2003 08:40 AM

I have to create & edit Active Server Pages. Whilst MS VID can be for ASP, VEDIT is used for JSP and PSP versions. However the Colour Syntax Highlighting is a nightmare, because there are three 'types' of data in one file: HTML 'standard' tags, JScript/ECMAscript within <script> tags, and server-side code between '<% %>' tags, which can appear ANYWHERE in the page, even inside quoted strings, HTML tags and JScript code - and any nesting thereof (I can send you a sample if you need one).
Worse still, there doesn't have to be whitespace around these tags, so VEDIT sometimes misses them... (why?)
The server-side code is either Java (JSP), PL_SQL (PSP) or VBscript (ASP) - there may be others I don't know of.

I have created SYN files for JSP and PSP (available if wanted) - they aren't ideal, but sort of work.

I think the IDEAL way to handle this is to regard the server-script escapes (<% %>) as a special case, which causes 'switching' to another syntax file (or section within the same file), but this requires VEDIT to be changed to allow this. Any chance of this being considered? If not, do you know how other users handle this situation?

Otherwise, VEDIT is a great editor, and I use it as the editor of choice.

 


Topic: Active Server Pages (ASP, JSP, PSP) (2 of 3), Read 96 times
Conf: Program develop.,Color syntax
From: David Radcliffe
Date: Thursday, February 06, 2003 08:45 AM

Please note that the following codes disappeared from my posting: < % and % > (no spaces - added to get the page to accept them). These are the server-side script tags.

 


Topic: Active Server Pages (ASP, JSP, PSP) (3 of 3), Read 87 times
Conf: Program develop.,Color syntax
From: Pauli Lindgren
Date: Wednesday, February 12, 2003 12:47 PM

On 2/6/2003 8:40:36 AM, David Radcliffe wrote:
>
>I think the IDEAL way to handle this is to regard the
>server-script escapes () as a special case, which causes
>'switching' to another syntax file (or section within the
>same file), but this requires VEDIT to be changed to allow
>this. Any chance of this being considered? If not, do you
>know how other users handle this situation?

I am afraid that would be very difficult to do. It seems to be difficult enough to get the multi line comments to work.

One possible solution would be to use different syntax files for each language. When you start working with Javascript, for example, load the javascript syntax file. When you switch to html, load html syntax file.

You could create a User Menu entry for each syntax file, and then put a button for those in your toolbar. Now you can switch the syntax highlight with single mouse click.

-- Pauli