简体   繁体   English

Visual Studio 2008的C ++语法高亮?

[英]C++ syntax highlighting for Visual Studio 2008?

I just want to see my own datatypes/functions/function parameters with a different color. 我只想看到我自己的数据类型/函数/函数参数与不同的颜色。

I have used Visual Assist X before, but it stopped working for some unknown reason. 我之前使用过Visual Assist X ,但由于某些未知原因它停止工作。 It doesn't color the custom functions or function parameters every time. 它不会每次都为自定义函数或函数参数着色。 Also, my trial time is over soon, and I am not going to buy something that doesn't work properly or whose most features I don't even use. 此外,我的试用时间很快就结束了,我不打算买一些不能正常工作或者我甚至不使用的大多数功能。

So, if there's any free syntax highlighting that colors all functions, etc. for Visual Studio 2008, that's what I'm looking for. 因此,如果有任何免费的语法突出显示为Visual Studio 2008的所有功能等着色,那就是我正在寻找的。

You can create a file(usertype.dat) containing any names, these will be colored differently. 您可以创建包含任何名称的文件(usertype.dat),这些名称将以不同方式着色。

You can read more about that here 你可以在这里阅读更多相关信息

Unfortunately you can't give your different types different colors from there but at least you can get your own types colored. 不幸的是,你不能从那里给你不同类型的不同颜色,但至少你可以得到你自己的颜色。

To color your own data structures, functions and parameters, a highlighter should know that they are your own data structures, functions and parameters. 要为自己的数据结构,函数和参数着色,荧光笔应该知道它们是您自己的数据结构,函数和参数。 It means it should be able to parse C++ code. 这意味着它应该能够解析C ++代码。 But, C++ code parsing is extremely hard task, so no one will do that just to highlight a couple of words. 但是,C ++代码解析是一项非常艰巨的任务,所以没有人会这样做只是为了突出显示几个单词。 So, this may be just an associated feature of some powerful tool that definitely costs money. 因此,这可能只是一些功能强大的工具的相关功能,肯定会花钱。

Actually, it seems there are just some problems with your environment. 实际上,您的环境似乎存在一些问题。 I use Visual Assist X with Visual Studio 2003, 2005 and 2008 and it works like a charm! 我在Visual Studio 2003,2005和2008中使用Visual Assist X,它就像一个魅力!

I'd recommend proceeding with Visual Assist X if you are serious about MS VC++ programming. 如果您认真对待MS VC ++编程,我建议继续使用Visual Assist X. Actually, it is a must have tool as, say, ReSharper for CSharpers. 实际上,对于CSharpers来说,它是必须拥有的工具,比如ReSharper。

If you have the option to use Visual Studio 2010, there is Highlighterr , which changes the colors of classes, structs, macros and typedefs. 如果您可以选择使用Visual Studio 2010,则可以使用Highlighterr ,它可以更改类,结构,宏和typedef的颜色。 There doesn't appear to be a version for Visual Studio 2008, but what are you waiting for? 似乎没有Visual Studio 2008的版本,但您还在等什么? ;-) C++0X awaits… ;-) C ++ 0X等待...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM