使用 ReSharper 和 Productivity Power Tools 在 VS2010 中设置 TODO 注释字体颜色

发布于 2024-11-15 02:05:19 字数 325 浏览 3 评论 0 原文

我刚刚安装了 Visual Studio 2010 的 Productivity Power Tools。我还安装了 ReSharper。在安装 PowerTools 之前,我的 TODO 注释(即 // TODO: Do Something)使用 VS 选项下列出的字体作为“Resharper Todo Item”显示在代码中。现在它是深蓝色,显然忽略了 VS 选项中的设置。

我使用的是深色主题,所以我几乎无法阅读这些评论。我已经翻遍了我能找到的所有选项(VS 选项中的所有选项,包括新的电动工具选项,以及 ReSharper 选项中的选项),但找不到它。

有什么想法吗?

I just installed the Productivity Power Tools for Visual Studio 2010. I also have ReSharper installed. Prior to the PowerTools installation, my TODO comments (i.e. // TODO: Do Something) were showing up in the code using the font listed under VS options as "Resharper Todo Item". Now it's a dark blue color, and apparently ignoring the setting in the VS options.

I'm using a dark theme, so I can barely read these comments. I've dug through all the options I can find (all of the options in VS options including the new power tools options, and in the ReSharper options), and can't find it.

Any thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

幽蝶幻影 2024-11-22 02:05:19

要更改文本编辑器中 TODO 项目的颜色,请使用 Visual Studio 更改环境设置(工具 -> 选项 -> 环境 -> 字体和颜色),

然后滚动到“显示项目”列表中的项目在这种情况下是“Resharper TODO item”

更新:这适用于 Resharper 7.18.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

淡墨 2024-11-22 02:05:19

我在使用 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

  1. 关闭所有 Visual Studio 实例
  2. 打开 C:\Program Files (x86)\Microsoft Visual Studio {VS version}\Common7\IDE\Extensions\extensions.configurationchanged 文件
  3. 在那里键入任何内容
  4. 保存文件
  5. 打开VS并检查工具|中的字体和颜色选项|环境

希望这对任何 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

  1. Close all Visual Studio instances
  2. Open C:\Program Files (x86)\Microsoft Visual Studio {VS version}\Common7\IDE\Extensions\extensions.configurationchanged file
  3. Type anything there
  4. Save the file
  5. Open VS and check Fonts and Colors in Tools | Options | Environment

Hope this helps any Resharper 8 users :-)

海螺姑娘 2024-11-22 02:05:19

你尝试过这个对话框吗? (Resharper -> 选项 -> 工具 -> 待办事项)靠近底部

在此处输入图像描述

Did you try this dialog? (Resharper -> Options -> Tools -> Todo items) near the bottom

enter image description here

森林散布 2024-11-22 02:05:19

如果这对某人有帮助,我发现 Visual Studio 2010 中的 TODO 问题又发生了冲突。安装 VSCommands 扩展时会发生这种情况。要修复 TODO 着色,

  1. 请转到 Tools ->选项->字体和颜色
  2. 在“显示项”列表中查找 VSCommands.Comment.Todo
  3. 修复颜色;)

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,

  1. go to Tools -> Options -> Fonts and Colors.
  2. Find VSCommands.Comment.Todo in the Display Items list.
  3. Fix the colouring ;)
尬尬 2024-11-22 02:05:19

如果您的 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.

心碎无痕… 2024-11-22 02:05:19

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文