How do I make all occurrences of a phrase (search term) in a file to be highlighted in the VS code editor?
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.
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.
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.
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
ReSharper can do this with the Highlight Usages feature: Highlight Usages In File
Course, you need ReSharper ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With