Syntax highlighting for ASP .NET


#1

I’ve just started learning ASP .NET and found a reference to Atom as being a good editor for HTML and CSS. As a lot of what I’m writing is HTML, I thought I’d give it a go.

I have been using Notepad++ which is a good editor but I like the syntax highlighting Atom provides and many of the other features.

Problem is, I put a comment into my code with the single quote at the beginning of the line which then marked all the rest of my code from that point on with white text on orange.

I couldn’t find a reference to ASP anywhere but is there a way of highlighting my code properly?


#2

This is what I found when searching for asp.net on the Atom packages site:

You might want to give those a try?


#3

Thank you for that tip.

I’ve now installed that package but I’m not sure what to do next? I’m sure I saw somewhere a way to pick the syntax to associate with a file type but I can’t find that now. At present, it’s still being highlighted the old way.


#5

I see under the Grammar that installing the package has associated aspx with the new package. However, that’s obviously expecting my code to be C#. Mine is VB which is the issue with it not recognising the comment syntax.

I don’t feel that confident to edit the package as I’m very new at all this. Could someone give me some direction as to how I might modify it to accept the VB way of marking comments?


#6

Following the lead of searching the packages, I found one for VB .NET which works fine for my code.