Contact us Start a Trial

Occurrence highlighting

Clicking an identifier highlights it, as well as all references to it within the same file. This occurrence highlighting is intelligent: it’s not based on the identifier’s string value but on the construct to which the identifier refers.

Only true references are highlighted, not any occurrence in strings , comments , or other similarly named constructs . This allows you to quickly spot the actual usages of the identifiers. You can also see these occurrences in the overview ruler . Every grey box on it represents an occurrence.

By enabling the editor.selectionHighlight preference, the text occurrences (, , and ) will additionally be highlighted.

Mark Occurrences in VS Code