开发者

Visual C++ 2008 syntax highlighting

开发者 https://www.devze.com 2023-01-22 04:53 出处:网络
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->Font

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 plugi开发者_运维知识库n is free).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消