使用 ReSharper 和 Productivity Power Tools 在 VS2010 中设置 TODO 注释字体颜色
我刚刚安装了 Visual Studio 2010 的 Productivity Power Tools。我还安装了 ReSharper。在安装 PowerTools 之前,我的 TODO 注释(即 // TODO: Do Something
)使用 VS 选项下列出的字体作为“Resharper Todo Item”显示在代码中。现在它是深蓝色,显然忽略了 VS 选项中的设置。
我使用的是深色主题,所以我几乎无法阅读这些评论。我已经翻遍了我能找到的所有选项(VS 选项中的所有选项,包括新的电动工具选项,以及 ReSharper 选项中的选项),但找不到它。
有什么想法吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
要更改文本编辑器中 TODO 项目的颜色,请使用 Visual Studio 更改环境设置(工具 -> 选项 -> 环境 -> 字体和颜色),
然后滚动到“显示项目”列表中的项目在这种情况下是“Resharper TODO item”
更新:这适用于 Resharper 7.1 和 8.2 以上,如 此评论
对于 Resharper 8 < 8.2请查看下面的解决方案,作者:@Soeholm
To change the colour of the TODO items in the text editor, change the environment settings using Visual Studio (Tools -> Options -> Environment -> Fonts and Colors)
Then scroll to the item in the "Display items" list which in this case is "Resharper TODO item"
UPDATE: this applies to Resharper 7.1 and 8.2 upwards as pointed out in this comment
For Resharper 8 < 8.2 please see the solution below by @Soeholm
我在使用 Resharper 8.0.1 时遇到了这个问题,并且其他答案都没有帮助我,因为“Resharper TODO item”没有出现在列表中。
我在这里找到了问题的解决方案:
http://resharper-support.jetbrains.com/entries/26859128-ReSharper-Fonts-Colors-settings-do-not-appear-in-Visual-Studio-after-installation
希望这对任何 Resharper 8 用户有所帮助:-)
I had this problem with Resharper 8.0.1 and none of the other answers helped me since "Resharper TODO item" did not show up in the list.
I found a solution to the problem here:
http://resharper-support.jetbrains.com/entries/26859128-ReSharper-Fonts-Colors-settings-do-not-appear-in-Visual-Studio-after-installation
Hope this helps any Resharper 8 users :-)
你尝试过这个对话框吗? (Resharper -> 选项 -> 工具 -> 待办事项)靠近底部
Did you try this dialog? (Resharper -> Options -> Tools -> Todo items) near the bottom
如果这对某人有帮助,我发现 Visual Studio 2010 中的 TODO 问题又发生了冲突。安装 VSCommands 扩展时会发生这种情况。要修复 TODO 着色,
Tools ->选项->字体和颜色
。If it will help to someone, I found one more collision with the TODO thing in Visual Studio 2010. It happens when VSCommands extensions is installed. To fix the TODO colouring,
Tools -> Options -> Fonts and Colors
.如果您的 Visual Studio 在工具 -> 中没有 ReSharper 颜色的设置选项->环境->字体和颜色您可以通过从注册表中删除缓存来恢复它们。
对于 VS 2013,缓存位于注册表中:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache
VS2012 缓存位于
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\FontAndColors\Cache
这两个都需要单独重置
备份然后删除整个缓存文件夹为我解决了这个问题,以便下次启动 VS 2013 时我可以使用 ReSharper 颜色设置。
If your Visual Studio does not have the settings for ReSharper colors in the Tools -> Options -> Environment -> Fonts And Colors you may be able to get them back by deleting the cache from the registry.
For VS 2013 the cache is located in the registry at:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache
VS2012 cache is located at
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\FontAndColors\Cache
These both need to be reset seperately
Backing up then deleting the entire cache folder fixed the issue for me so that next time I started VS 2013 I had the ReSharper color settings available.
VSCommands 插件也可以改变这一点。但由于“TODO”的默认颜色是红色,而不是蓝色,因此它可能不会影响您。话虽这么说,除了上面 Genius 的回复之外,VSCommands 中还有一个关于“注释格式”的专门页面:Visual Studio 2010 红色评论。
The VSCommands plugin can also change this. But since their default color for "TODO" is red, not blue, it's probably not what is affecting you. That being said, in addition to Genius' reply above, there is a dedicated page on "Comments Formatting" in VSCommands here: Visual Studio 2010 Red Comments.