.net Visual Studio 2017 和 2019 在滚动条中突出显示所选单词的出现次数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43229545/
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
Visual Studio 2017 & 2019 highlight occurrences of selected word in scrollbar
提问by ToFo
When I mark a word (of any kind) I would like all occurrences (in that particular file) of that word to be highlighted in the scrollbar on the right hand side.
当我标记一个单词(任何类型的)时,我希望在右侧的滚动条中突出显示该单词的所有出现(在该特定文件中)。
This was a feature in VS2015 and VS2013. I cannot imagine that they removed it, I just don't know how to switch it on. None of the apparent possibilities in Tools -> Options (image) helps me.

这是 VS2015 和 VS2013 中的一个特性。我无法想象他们删除了它,我只是不知道如何打开它。工具 -> 选项(图像)中的任何明显可能性都没有帮助我。

Ps. I am using Visual Studio 17 Professional. Thank you.
附言。我正在使用 Visual Studio 17 专业版。谢谢你。
回答by Richard
This was a feature in VS15 and VS13.
这是 VS15 和 VS13 中的一个特性。
Actually it was not.
事实并非如此。
It is a feature of the Productivity Power Toolsextension. That extension is now just an installer for separate single feature extensions. I think you'll be wanting Match Margin.
它是生产力电动工具扩展的一项功能。该扩展现在只是单独的单个功能扩展的安装程序。我想你会想要Match Margin。
回答by Tomasz Szalkowski
Right now, the only way I know (without installing new extensions) is to select (double click) the word and hit ctrl-f (find). Scroll map should highlight all occurences (mine are orange)
现在,我知道的唯一方法(不安装新扩展)是选择(双击)这个词并点击 ctrl-f(查找)。滚动地图应突出显示所有出现(我的是橙色)
回答by itsho
There's another extension which does exactly this, with options to customize colors and more. it called Word Highlight With Margin.
还有另一个扩展可以做到这一点,可以选择自定义颜色等等。它称为Word Highlight With Margin。
The extension created by Trung Kien Phan
由Trung Kien Phan创建的扩展
Screenshots
截图






VS2017/VS2019 Version
VS2017/VS2019版本
Download link from Visual Studio market place - VS2017, VS2019
从 Visual Studio 市场下载链接 - VS2017、VS2019

