visual-studio Visual Studio (C++) 中自己类型的语法着色

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1386674/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:58:29  来源:igfitidea点击:

Syntax coloring of own types in Visual Studio (C++)

c++visual-studiosyntax-highlighting

提问by Tony the Pony

How can I get Visual Studio to highlight my own class types? This works fine for C# but not for C++...

如何让 Visual Studio 突出显示我自己的类类型?这适用于 C# 但不适用于 C++...

回答by browe

For those running Visual Studio 2010 Highlighterrmay fit your needs. It's also in the MSDN Visual Studio Gallery. It leverages the improved C++ IntelliSense in 2010.

对于那些运行 Visual Studio 2010 Highlighterr 的人来说,可能会满足您的需求。它也在 MSDN Visual Studio Gallery 中。它利用了 2010 年改进的 C++ IntelliSense。

It makes you set special highlighters in Environment -> Fonts and Colors for the types it detects, but overall it works quite well from what I've seen.

它使您可以在 Environment -> Fonts and Colors 中为它检测到的类型设置特殊的荧光笔,但总的来说,从我所看到的来看,它的效果非常好。

回答by Am1rr3zA

you can use viusal-assistor Re-sharper

你可以使用viusal-assistRe-sharper

both have setting for your syntax highlightin in C#and C++

两者都有设置你的语法高亮C#C++

and do extra work such as make optional short key on IDE for you.

并做一些额外的工作,例如为您在 IDE 上制作可选的快捷键。

  • Develop new code faster with fewer errors.
  • Quickly understand existing code.
  • Refactor existing code making it easier to read and cheaper to maintain.
  • Eliminate time spent searching by allowing instant navigation to any file, symbol or reference.
  • 以更少的错误更快地开发新代码。
  • 快速理解现有代码。
  • 重构现有代码,使其更易于阅读且维护成本更低。
  • 通过允许即时导航到任何文件、符号或参考,消除搜索时间。

回答by sbi

Install Visual Assist. IIRC, you can download and test it for 30 days.

安装视觉辅助。IIRC,您可以下载并测试30天。

Beware, though. It's quite addictive. Out of 20 Windows developers I have seen testing this, 18 had their management buy it. :)

不过要小心。这很容易上瘾。在我见过的 20 名 Windows 开发人员中,有 18 名让他们的管理层购买了它。:)