Highlighting of matching code elements
When you move through the code using the keyboard, dotPeek helps you quickly understand code structure by highlighting code elements that match the one where your caret is
dotPeek highlights the opening or closing delimiter (
<>) when you set the caret at its pair. Any opening parenthesis, bracket, brace or quote (altogether called "delimiters") can be highlighted with color or outline whenever you place the caret at the corresponding closing delimiter, and vice versa.
If necessary, you can disable highlighting of matching delimiters or configure their behavior:
When to highlight matching delimiters: when the caret is directly to the left or to the right of one of the delimiters or only when it is at the outer side.
To define how dotPeek highlights matching delimiters, use the Highlight matching delimiters preference on the page of dotPeek options Ctrl+Alt+S.
Matching control flow keywords
dotPeek highlights matching control flow keywords such as
throw together with the corresponding return type;
else that are parts of the same condition;
default together with the corresponding
continue with the corresponding
while; as well as related
await keywords in the same method.
In the example below, dotPeek highlights all places where the method can return when the caret is at one of the
Matching logical and conditional operators
dotPeek highlights matching logical and conditional operators (
&&, as well as
? pairs) that work together in a complex expressions when your caret is at one of such operators.
In the example below, %product helps understand that the highlighted operators will be evaluated together, while the
value1 > 1 || value2 >= 2 && condition1 part will be evaluated before, and the
|| value6 %lt; value7 || condition2 part will be evaluated after, according to the operator precedence.
This feature is inspired by and borrowed from JetBrains ReSharper, a developer productivity tool for Microsoft Visual Studio.