My problem is this: Visual Studio Code automatically highlights similar code fragments, it’s very convenient, I don’t want to lose this opportunity.

But if, for example, to designate the variable K , and the other - K1 , then when you hover over K , the Visual Studio Code selects all the letters K in all the code, not the most convenient thing.

My question is, is it possible to somehow leave the function of finding such code fragments turned on, but make it work only for the complete coincidence of a word?

Thank you in advance.

Variable allocation example

  • Copy the technical code and paste it here. The picture is not very convenient. - 0xdb
  • @ 0xdb So the matter is not in the code, but in the way VS Code displays it, if I copy the code, then you will not see those selections that I ask about. But if you insist, then here is a piece of pseudo code. #include <iostream> int main () {int k, k1; k = 5; k1 = 6; std :: cout << k + k1; } In this example, when you stop the cursor on k, all the letters k in the whole code are highlighted, and it’s not very convenient, I want only the specified variable k to be highlighted. - Dmitrii Gvozdev
  • Sorry, inattentively read the question. - 0xdb
  • This is implemented by default. When you select or double-click, text matches are highlighted, and with focus or a single click, variables are highlighted, for example. In the second case, the declaration of the variable is highlighted in a separate color, and the calls are separate. - Roman Stoliarenko

0