Question

I like the "zither strings" that Visual Studio 2013 displays, that help visually align the braces in try / using / while / etc. blocks of code. I also enjoy them aesthetically, as they appear in different visual representations of points along the electromagnetic spectrum:

enter image description here

But, are those colors "more than a pretty face"? In the screen shot above, I see, from left to right, gray, teal, midnight blue, grey, gray, grey, gray, purple, and grey again. Is this just to help differentiate one line from another? If so, why are several succeeding lines the same hue (as far as I can tell)?

Or, do the colors signify something, such as teal for classes, midnight blue for methods, purple for while, and gr[a,e]y for everything else?

Was it helpful?

Solution

These are part of the Productivity Power Tools for VS2013 (see here). Specifically they are part of the Structure Visualizer feature.

There does seem to be some meaning in the colours. I haven't been able to find a definitive list of colours, but I've noticed the following:

  • Grey for general blocks, like namespaces, try / catch blocks and using blocks. The grey for namespaces seems to be a bit darker than other block types.
  • Teal for classes
  • Blue for methods
  • Green for conditional blocks (if / then, switch)
  • Purple for looping blocks (for, foreach)

You can turn the lines on and off in the Productivity Power Tools section of the Options dialog.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top