After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 139968 - ASP Support for GtkSourceView
ASP Support for GtkSourceView
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2004-04-13 20:23 UTC by Scott Martin
Modified: 2009-04-12 16:31 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Example ASP Language spec (16.95 KB, text/xml)
2004-04-13 20:29 UTC, Scott Martin
Details
ASP Syntax Highlighting for GTKSourceView-2.0 (16.59 KB, text/xml)
2009-01-09 08:47 UTC, Fabio Zendhi Nagao
Details
[FIXED] ASP Syntax Highlighting for GTKSourceView-2.0 (16.61 KB, text/xml)
2009-01-09 09:01 UTC, Fabio Zendhi Nagao
Details
example (71.80 KB, image/png)
2009-01-09 11:32 UTC, Ignacio Casal Quinteiro (nacho)
Details
[UPDATED] GTKSourceView-2.0 asp.lang (32.75 KB, application/xml)
2009-01-09 12:51 UTC, Fabio Zendhi Nagao
Details
ASP Xtreme Evolution Model for Pastebin Controller (19.46 KB, text/asp)
2009-01-09 13:02 UTC, Fabio Zendhi Nagao
Details
ASP/VBScript language spec to GTKSourceView 2.0 (40.89 KB, application/xml)
2009-01-15 17:58 UTC, Fabio Zendhi Nagao
Details
Updated lang definition (41.00 KB, application/xml)
2009-04-12 12:14 UTC, Fabio Zendhi Nagao
Details

Description Scott Martin 2004-04-13 20:23:21 UTC
GtkSourceView does not highlight the syntax of ASP files.
Comment 1 Scott Martin 2004-04-13 20:29:23 UTC
Created attachment 26632 [details]
Example ASP Language spec

Here's an ASP language specification file I've been using. It works well and is
fairly exhaustive (and large), containing all the sytax
elements/properties/methods/events/operators etc. that I could find in
Microsoft's online documentation.

I wrote this file because I had to learn ASP/VBScript for a recent project.
Syntax highlighting made the coding a lot easier. Since it's based on my
experience, it only includes VBScript syntax for highlighting. Also, I think
VBScript is the default and most widely used (?). This file could be enhanced
to handle JScript, VB.Net, etc., and whatever else ASP allows as a scripting
language, but I'm not really that familiar with any of those other languages.
Comment 2 Paolo Maggi 2006-07-26 09:47:14 UTC
Does anyone knowning ASP want to try this .lang file?
Comment 3 Paolo Maggi 2006-07-26 12:29:51 UTC
Is application/x-asp recognized as mime-type by shared-mime-info?

As a policy we do not include lang files whose mime types are not in shared-mime-info.
Comment 4 Brett Alton 2008-06-25 13:36:14 UTC
If this appears at the top '<%@LANGUAGE="JAVASCRIPT"%>' then you can highlight any programming enclosed in <% %> as JavaScript. The rest should be HTML. Not sure how to make that into a .lang file, but it works for me!

As for VBScript, what Scott Martin has above seems to be correct.
Comment 5 Fabio Zendhi Nagao 2009-01-09 08:47:29 UTC
Created attachment 126091 [details]
ASP Syntax Highlighting for GTKSourceView-2.0
Comment 6 Fabio Zendhi Nagao 2009-01-09 08:55:30 UTC
Hi, I'm a professional ASP Developer and use gedit daily for my work. I was using Scott Martin asp.lang but somehow I feel strange with it. Mostly because of odd highlighting like in "end function", missing ADO and HTML syntax. So I created a new one from the ground using scripting documentation 5.6, ado 2.5 and asp 3.0 specification. It alsos separate ASP Blocks from HTML blocks and highlight then all, just like the PHP one.

I'm currently running it in gedit 2.22.3

Glad to share,

Fabio Zendhi Nagao (nagaozen)
Comment 7 Fabio Zendhi Nagao 2009-01-09 09:01:33 UTC
Created attachment 126093 [details]
[FIXED] ASP Syntax Highlighting for GTKSourceView-2.0
Comment 8 Fabio Zendhi Nagao 2009-01-09 09:04:03 UTC
Comment on attachment 126093 [details]
[FIXED] ASP Syntax Highlighting for GTKSourceView-2.0

Sorry, I forgot to assing application/x-asap to the asp.lang.

@Paulo Maggi: Yes, they are recognized as mime-type by shared-mime-info
Comment 9 Ignacio Casal Quinteiro (nacho) 2009-01-09 10:37:20 UTC
Hi Fabio,

about the file looks good, but just a niptick:
shouldn't be <% %> highlighted as it is <?php ?> in php?
Comment 10 Fabio Zendhi Nagao 2009-01-09 11:12:31 UTC
Oro? Isn't it working this way for you? It's fine here 'cause asp block is defined as:

<context id="asp-block">
  <start>&lt;[%]</start>
  <end>[%]&gt;</end>
.
.
.
</context>
Comment 11 Ignacio Casal Quinteiro (nacho) 2009-01-09 11:32:24 UTC
Created attachment 126096 [details]
example

I mean, as you can see in the image the <% and the %> is not highlighted, I think that they should be. The should use the same style as in php with the <?php ?>
Comment 12 Fabio Zendhi Nagao 2009-01-09 12:51:24 UTC
Created attachment 126103 [details]
[UPDATED] GTKSourceView-2.0 asp.lang

(In reply to comment #11)
> Created an attachment (id=126096) [edit]
> example
> 
> I mean, as you can see in the image the <% and the %> is not highlighted, I
> think that they should be. The should use the same style as in php with the
> <?php ?>
> 

You are right, I missed it. It's now fixed. But i've assigned the style to "preprocessor" instead of "keyword" as used in php.lang. I've also inserted vb and ado constants.
Comment 13 Ignacio Casal Quinteiro (nacho) 2009-01-09 12:58:34 UTC
The file looks ok. I am going to commit it now but could you provide us with an example file of ASP no more than 10 lines? This is needed for the test script.

Thanks.
Comment 14 Fabio Zendhi Nagao 2009-01-09 13:02:48 UTC
Created attachment 126104 [details]
ASP Xtreme Evolution Model for Pastebin Controller

(In reply to comment #13)
> The file looks ok. I am going to commit it now but could you provide us with an
> example file of ASP no more than 10 lines? This is needed for the test script.
> 
> Thanks.
> 

Here's the example: pastebinModel.asp. 470 lines of ASP ;D
Comment 15 Ignacio Casal Quinteiro (nacho) 2009-01-09 13:11:20 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 16 Eli 2009-01-14 16:11:22 UTC
Fabio,

I have been using your asp.lang for work (thank you!), but I have noticed that it does not highlight Elseif as it does Else and If.
Comment 17 Fabio Zendhi Nagao 2009-01-14 16:27:59 UTC
(In reply to comment #16)
> Fabio,
> 
> I have been using your asp.lang for work (thank you!), but I have noticed that
> it does not highlight Elseif as it does Else and If.
> 

Hi Eli, I've noticed missing things too "adTypeReadWrite", for example ... I'm looking for new specifications to update the work.
Comment 18 Fabio Zendhi Nagao 2009-01-15 17:58:06 UTC
Created attachment 126524 [details]
ASP/VBScript language spec to GTKSourceView 2.0

I've updated the old version with the full ADO 2.7 constants. Also included elseif -- thx to Eli
Comment 19 Ignacio Casal Quinteiro (nacho) 2009-01-15 18:26:07 UTC
(In reply to comment #18)
> Created an attachment (id=126524) [edit]
> ASP/VBScript language spec to GTKSourceView 2.0
> 
> I've updated the old version with the full ADO 2.7 constants. Also included
> elseif -- thx to Eli
> 

Updated, thanks.
Comment 20 Fabio Zendhi Nagao 2009-04-12 12:14:09 UTC
Created attachment 132544 [details]
Updated lang definition

I've detected some keywords that wasn't in the lang spec. They've been added now.
Comment 21 Paolo Borelli 2009-04-12 16:31:59 UTC
I committed the missing keywords. But in the future please
  1 - open a new bug
  2 - attach a patch, not the whole file
  3 - make sure the file is in unix format, not dos

thanks