Highlight Usages in File

Last modified: 23 September 2024

The editor automatically highlights usages of a symbol at caret, which is very convenient in short files and for locals in small contexts. However, this kind of highlighting does not always work well in larger contexts because the selection is only there as long as the caret stays at the symbol.

There is also a caret-independent highlighting that stays until you press Esc and applies different configurable colors to read and write access usages. You can toggle this highlighting for a single item or for several different items simultaneously, and then use shortcuts to jump between the highlightings.

Usages of a symbol:

ReSharper: Highlighting usages of a symbol in the current document

Usages of all types from an imported namespace:

ReSharper: Highlighting usages of types form imported namespace

Usages of an expression:

ReSharper: Highlighting usages of selected expression

This feature is supported in the following languages and technologies:

The instructions and examples given here address the use of the feature in C#. For more information about other languages, refer to corresponding topics in the Languages and frameworks section.