Syntax Decorations

Syntax Decorations add extra information to your code display.

Source Insight can replace some common operators with more useful symbolic characters. The Preferences: Syntax Decorations command controls which decorations are used.

The symbolic characters are formatted with the "Symbol Characters" style. If you use the Options > Style Properties command to look at the Symbol Characters style, you will see that it uses the Symbol font. You may change the style's properties, such as the color or font size, but if you change the font name to some­thing other than Symbol, your syntax decoration symbols will probably not show up correctly.

It's important to remember that symbol substitutions do not change the text in the source file; only its repre­sentation on the screen changes to show the special symbols. You still need to type the operators normally when editing your code, or when searching for them.

Operator Substitutions

Common operators, such as the pointer dereference right arrow (->), or the assignment operator (=) can be replaced with symbolic operators, such as arrows. For example, instead of this:



With decorations on, the = and -> are replaced with arrows:



Boolean, math, and other operators can be substituted with decorative symbols too.

Scaled Nested Parentheses

Source Insight can display nested parentheses in different sizes to make it easier to identify matching sets. This even works across multiple lines.



Goto Arrows

Another useful decoration is the "goto arrow". An up or down arrow appears in goto statements which points in the direction of the target label.



End Brace Annotations

Source Insight can also add automatic "end brace" annotations to the closing curly brace in C/C++/C# and Java code. This makes it easier to understand nested if, while, switch, and other blocks of code.