好 C++ 的集合Visual Studio 2010 中的主题?
我找到了专门研究 Visual Studio 2010 主题的网站:http://studiostyl.es/。然而,似乎所有这些主题都是在考虑 C# 和 .NET 开发的情况下构建的。
我目前正在尝试进行一些 C++ 编程,但找不到有关 C++ 特殊主题的任何内容。现在,我几乎所有的 C++ 代码都是纯色的,看起来我还不如在记事本中编写它。
甚至可能是我的设置搞砸了,那些来自 studiostyles 的主题应该适用于所有语言;我刚刚开始使用 Visual Studio。
感谢您的回复。
I have found the site: http://studiostyl.es/ which specializes in Visual Studio 2010 themes. However, it appears that all of these themes are built with C# and .NET development in mind.
I am currently trying to get into some C++ programming and couldn't find anything on the subject of special themes for C++. Right now, almost all of my C++ code is a plain color and it looks like I might as well be writing it in notepad.
It may even be that I have my settings messed up and that those themes from studiostyles are supposed to be for all languages; I just started using Visual Studio.
Thanks for any replies.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,问题是 Visual Studio 根本没有像对 C# 或 VB.NET 那样对 C++ 提供内置语法突出显示支持。 某些语法突出显示确实有效。例如,字符串、注释、预处理器指令、运算符、数字和内置关键字都有自己的颜色。但如果你不动一根手指,你的很多代码确实会是一种颜色(“标识符”)。
正如 Jerry 所建议的,Visual Assist X 提供了比默认值更好的语法突出显示。但它不是免费的。
如果您像我一样正在寻找低预算解决方案,您可以定义您的自己的关键字。这至少会让它们以指定为“用户关键字”的颜色显示。该链接更详细地解释了您需要执行的操作,但实际上非常简单,只需将名为“usertype.dat”的纯文本文件放入 Visual Studio 应用程序文件夹中,然后键入您想要的每个自定义关键字即可。在单独的行上以自己的颜色突出显示。您必须重新启动 IDE 才能使更改生效。
由于您使用的是 VS 2010,另一个免费的解决方案是 Highlighterr for Visual C++ 扩展。这是定义您自己的关键字的一个步骤,并且通过语法突出显示变得更加有趣。它利用 VS 2010 中新的 Intellisense 支持来打开类、结构、宏和 typedef 的突出显示。我自己还没有安装它,因为我仍在 VS 2008 中进行 C++ 开发,但我非常想尝试一下。
No, the problem is that Visual Studio simply doesn't have anywhere near the built-in syntax highlighting support for C++ as it does for C# or VB.NET. Some syntax highlighting does work. For example, strings, comments, preprocessor directives, operators, numbers, and the built-in keywords all get their own colors. But a lot of your code will indeed be in one color ("Identifiers") if you don't lift a finger.
As Jerry suggests, Visual Assist X offers far better syntax highlighting than the default. But it's not free.
If you're like me and looking for a low-budget solution, you can define your own keywords. This will at least make them show up in the color earmarked for "User Keywords". The link explains what you'll need to do in more detail, but it's really as simple as placing a plain-text file named "usertype.dat" in the Visual Studio application folder, and typing each of the custom keywords that you want to appear highlighted in their own color on a separate line. You'll have to restart the IDE for your changes to take effect.
Since you're using VS 2010, another free solution is the Highlighterr for Visual C++ extension. This is one step up from defining your own keywords, and gets a little fancier with syntax highlighting. It takes advantage of the new Intellisense support in VS 2010 to turn on highlighting for classes, structs, macros, and typedefs. I haven't installed it yet myself because I'm still doing C++ development in VS 2008, but I'd very much like to try it out.
获取Visual Assist X,不再回头。
编辑:还有 重构!对于 C++。正如您从名称中可以猜到的那样,它主要面向重构代码,但如果内存服务还可以进行一些着色等操作。我最近没有使用过它,所以不能说更多(我已经使用 VA-X 多年了,几年前决定寻找替代品,但经过一两个月的测试后,决定坚持使用VA-X)。
Get Visual Assist X and don't look back.
Edit: There is also Refactor! for C++. As you can guess from the name, it's oriented primarily toward refactoring code, but if memory serves can also do some colorizing and such. I haven't used it recently enough to say much more than that (I've used VA-X for years, and a couple of years ago decided to look at alternatives, but after a month or two of testing, decided to stick with VA-X).