tags:

views:

21

answers:

1

I am writing a C++-CLI library in VS 2008, it highlights only the keywords. I would like to have highlighting for CLR types and the types that I define as well. Tried Tools->Options->Environment->Fonts and Colors doesnt seem to work. Can someone let me know how to do it in VS without using any plugin (happy to use if the plugin is free).

+2  A: 

You cannot get this out of Visual Studio. Its syntax highlighting is based on lexical analysis. Which detects simple programming elements, keyword, identifier, comment, number, string literal, preprocessor directive, etc. Selectively highlighting identifiers is a much harder problem, it requires parsing the text.

Not only is that slow, affecting the text rendering speed, it is also very difficult to do since the text is almost always in an un-parsable state as you're editing the code. The universal plug-in for the C++ IDE is Visual Assist from Whole Tomato. But it certainly isn't free, these kind of add-ons never are. No idea to what degree they support C++/CLI, you'd have to try with the trial download.

Hans Passant