Jump to content
  • Advertisement
Sign in to follow this  
_Sigma

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
Share on other sites
Quote:
Original post by Deyja
Or you could just give your script files the extension '.c'.

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

Share this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!