SFML community forums

Help => General => Topic started by: Jove on December 26, 2011, 09:47:16 pm

Title: Visual Studio and custom User Type Names
Post by: Jove on December 26, 2011, 09:47:16 pm
Guys, has anyone sucessfully managed to make your own type names in VS (2010) show up as blue?

You know, like defining a Uint8 or a sf::Vector2f so they appear as blue in your project like the standard types do?

It's only a little thing, but it would make the code that much more readable, don't you agree?

I've searched the topic way back and again tonight, still can't find a satisfactory solution. I'm not the best programmer, but I'm a sucker for clean, readable formatting.
Title: Visual Studio and custom User Type Names
Post by: Laurent on December 26, 2011, 10:30:57 pm
I don't know if it's still valid for Visual Studio 2010, but with Visual Studio 2008 you can add your own types to the usertype.dat file.

You can also try the Visual Assist plugin, if I remember correctly it highlights all user types automatically.
Title: Visual Studio and custom User Type Names
Post by: Jove on December 26, 2011, 10:50:06 pm
Yeah, I have come across the usertype.dat file on my travels, but this seems to be related to older versions; can't find the file on newer versions.

I will check out the plugin you mentioned in case that does the job.
Title: Visual Studio and custom User Type Names
Post by: Nexus on December 27, 2011, 12:57:06 am
You have to pay for Visual Assist, but it's worth the money for sure. It offers extremely nice features and refactoring tools which make boilerplate coding far more comfortable :)
Title: Visual Studio and custom User Type Names
Post by: Silvah on December 27, 2011, 05:28:13 pm
Quote from: "Laurent"
I don't know if it's still valid for Visual Studio 2010, but with Visual Studio 2008 you can add your own types to the usertype.dat file.
It looks like it's not, VS 2010 apparently ignores this file entirely.

Quote from: "Nexus"
You have to pay for Visual Assist, but it's worth the money for sure.
It would be, if you couldn't have these features for free (http://eclipse.org/cdt/) :P

It's worth noting that VA X (and all VS plugins in general) requires least VS Professional, it won't work in the Express edition.
Title: Visual Studio and custom User Type Names
Post by: Nexus on December 27, 2011, 05:56:47 pm
Quote from: "Silvah"
It would be, if you couldn't have these features for free (http://eclipse.org/cdt/) :P
I have used Eclipse for Java some time ago, and the eternal loading times and delays annoyed me constantly. Maybe this has been improved meanwhile. I don't know how well Eclipse's C++ support is and if it really offers the same features as Visual Studio + Visual Assist X (e.g. debugger), maybe I'll test it one day... :)