Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Is there a way to prevent that?

(VS version 17.4.2)

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading