VS Code highlight all occurrences of a variable?
Pressing Ctrl + F2 marks all occurrences of the variable housingLocation. I also mark housingLocation in comments or when HousingLocation is capitalized at the beginning .
Is there a way to only display all occurrences of the variable housingLocation
to mark in VS Code. If so, how?
str+F, enter the variable name, and then activate case-sensitive search
So you turn off HousingLocation, yes, but in the comments, housingLocation will continue to be marked what I don’t want.
use the built-in search function, Ctrl + F
there are filters that you can set to get only whole words and be case-sensitive
I don’t know how it goes with the comments. But, you can also turn on case sensitivity in the Search menu: