This extension for Visual Studio 2019 lets you easily find where the selected text also occurs in the current document. You select the text you want to search, and all other occurrences of the same text are highlighted automatically, as seen in this description. The other places are indicated in the scroll bar margin to give you an overview. (This behaviour is known from the text editor application Notepad++.)
Additionally, all occurrences of TODO keywords are highlighted with a different colour in the editor as well as the scroll bar margin. This allows you to quickly write an open issue directly into the code – and notice it again later!
Collapsed code regions also show the highlighting colour so that it is easily visible where such occurrences or keywords exist.
(The screenshot also features the Indent Guides extension and a bit of syntax colour customisation available from VS 2019.)
For previous versions of Visual Studio you might find my older extension “TODO Highlighter” interesting.
Although not recommended, it is common practice to use comments with the “TODO” keyword throughout new code to indicate that something remains to be done in a certain place. And they serve as a good skeleton when writing down code for a work item, then adding the implementation details for each part of it. These comments mostly look like other explanatory inline comments and are hard to find again unless you actually perform a text search for the keyword. This extension makes these keywords easily visible so that you quickly see where is work left to do before publishing the code.
TODO keywords as well as other occurrences can optionally be ignored within comments or strings of the source code.
The appearance and behaviour of this extension can be configured in the standard Visual Studio settings dialog window. The colours are customisable through the section “Fonts and Colors”, the other behaviour can be changed in the section “Selection Highlighter”, both under “Environment”.
The following colours can be set:
The background colour sets the highlighting fill, and the foreground colour sets the border around that highlighting. Set the foreground to “Standard” to hide the border.
The following options can be configured: