Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Visual Studio from highlighting similar words

If I highlight a variable named "abc", and I also have a method named "abc1", the abc in abc1 get lightly-highlighted.

enter image description here

I tried preventing that by unchecking Tools > Options > Text Editor > C# > Advanced > Highlighting > Highlight related keywords under cursor [what does that even mean?] but to no avail.

Is there a way to prevent that?

(VS version 17.4.2)

like image 320
ispiro Avatar asked Nov 30 '25 12:11

ispiro


1 Answers

This is the Selection Match Highlighting feature.

The selection match highlighting is a new feature to help you quickly find additional occurrences of a string in the document you’re editing.

When it’s checked, any time you select something in your editor, anywhere else that exact string occurs will be subtly highlighted both in the editor and in the scrollbar.

To disable, uncheck the "Show selection matches" checkbox

Tools > Options > Text Editor > General > Show selection matches

enter image description here

like image 169
pfx Avatar answered Dec 03 '25 00:12

pfx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!