# AS syntax highlighting in VS

This topic is 4077 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Been in communication with Jon, the developer of Codekana, ViEmu, etc. Was talking to him concerning how easy it is to add custom highlighting to VS (not easy :( ), and he suggested something. Since AS is very similar to C/C++, you can use the C/C++ syntax highlighter on AS scripts. Some things break the highlighting, such as '@'s, but minor price to pay, IMHO, for having basic synhl when developing scripts! Go to
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\File Extensions


(Substitute 8.0 by 7.1 for VS.NET 2003). Create a new key, and name it '.as'. Copy the value of Default from the .cpp key, and paste it into the Default value of the new .as key. And now you have C highlighting for your AS scripts. Hopefully this can help someone else out. Like I said, it has limitations, but such is life. little demo: [Edited by - _Sigma on July 23, 2007 3:45:58 PM]

##### Share on other sites
This is the kind of information that may be good to add to the wiki. Would like to do that?

In case you didn't already know, the wiki is located at: http://angelscript.pbwiki.com

The wiki is unfortunately not very up to date, but if people start adding information to it, I'm sure more and more will start using it and pointing out things that needs to be updated.

Regards,
Andreas

##### Share on other sites
Or you could just give your script files the extension '.c'.

##### Share on other sites
Quote:
 Original post by DeyjaOr you could just give your script files the extension '.c'.

Yes you could, but this has the potential to become confusing.

##### Share on other sites
Quote:
 Original post by WitchLordThis is the kind of information that may be good to add to the wiki.

What? You didn't add this to the documentation after the first time this came up. *ducks and hides*

##### Share on other sites
Oops, sorry SiCrane! I had no idea that you'd posted this before.

##### Share on other sites
Considering it was three and a half years ago, before you even joined, I think you can be forgiven. I'm just giving Witchlord a hard time since he's usually pretty good about folding stuff that comes up in the forums into the AngelScript documentation.

##### Share on other sites
SiCrane, I didn't even remember that old post anymore. Quite a memory you have. ;)

Since it is now twice that I've received this tip, I feel obliged to add it to the wiki myself. Syntax highlighting

Looks good.

##### Share on other sites
I can't figure out if your wiki supports file uploads. In the event that it does, you may want to upload .reg files for the syntax highlighting changes instead of/in addition to the directions for doing it manually. The .reg file for 2003 would look like:
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions\.as]@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"

And for 2005:
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\File Extensions\.as]@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"

Just name them something like as2003.reg and as2005.reg.

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5
frob
12

• 9
• 21
• 12
• 9
• 17
• ### Forum Statistics

• Total Topics
632606
• Total Posts
3007384

×