Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to highlight occurrences of a search term in text in Visual Studio?

How do I make all occurrences of a phrase (search term) in a file to be highlighted in the VS code editor?

like image 289
axk Avatar asked Nov 02 '08 14:11

axk


People also ask

How do you highlight a word in Visual Studio?

In the editor window, when you select a word with a mouse or keyboard, this extension will searches and highlights all occurrences of current selected word in the current document. You can change settings of the extension by go to "Tools" -> "Word Highlight settings..." menu.

How do I highlight keywords in Vscode?

To customize the keywords and other stuff, command + , (Windows / Linux: File -> Preferences -> User Settings) open the vscode file settings. json . Toggle the highlight, default is true. Whether the keywords are case sensitive or not.

How do I highlight in Visual Studio 2019?

Install via Visual Studio Marketplace (https://marketplace.visualstudio.com/items?itemName=jendelel.MultiWordHighlight). Right click on any word under the caret and select Toggle highlight of current word in the MultiWordHighlight menu.


2 Answers

I noticed that a nice side effect of the Rock-Scroll plugin is that when you double-click a keyword it highlights all occurrences in the file (and in the rock scroll preview) as well.

http://microsoftdev.blogspot.com/2008/05/rock-scroll-visual-studio-plugin.html

Hope that helps, Alex

like image 145
Alex Duggleby Avatar answered Sep 28 '22 23:09

Alex Duggleby


ReSharper can do this with the Highlight Usages feature: Highlight Usages In File

Course, you need ReSharper ;)

like image 44
remotefacade Avatar answered Sep 28 '22 22:09

remotefacade