Turn Off Automatic Highlighting of Matching Words in Visual Studio 2022 (C++)

Ford, Kyle 20 Reputation points
2024-03-29T15:00:02.2333333+00:00

How do I toggle the highlighting of "matching words" for C/C++ in the text editor?

I found a similar question for "Visual Basic" and "C#".
I am unable to find the option(s) for "C/C++".

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 122.6K Reputation points
    2024-03-29T15:14:20.5466667+00:00

    Go to menu, TOOLS, Options, Text Editor, C/C++, Advanced, and change the “Disable Reference Highlighting” option.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Michael Taylor 60,326 Reputation points
    2024-03-29T15:17:22.79+00:00

    In Options, go to Text Editor \ C/C++ \ View. Then go down to Miscellaneous and finally Highlight Matching Tokens. Alternatively go to the Options and type Matching in the search bar and it'll do the same thing.

    0 comments No comments

  2. Nicolas 1 Reputation point
    2024-12-03T23:41:46.84+00:00

    Sadly, these options do not work for XAML. When editing WPF you can select controls in the UI. In previous versions of Visual Studio this would highlight the control in the code so you could find the code easily for a given control. Now it highlights the control and all the ones like it.

    For example, if your UI has 10 buttons and you select one of the buttons, all the <Button> tags are highlighted so you don't know which button you just selected.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.