5

The SPE IDE that I use for my Python code uses this "visual cue" that looks like a vertical dashed line for alignment of (what I would call) function blocks. How can I get this option in Visual Studio 2008?

Here is what it looks like:

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
seedofc
  • 53
  • 4

3 Answers3

3

I've seen it called structural highlighting or code outlining.

There's a Visual Studio plug-in called CodeRush from Developer Express that supports this (bottom of the page) and a lot more.

update:

As divo mentioned, there is a free lite version of CodeRush. I confirmed that it includes structural highlighting.

Bruce McGee
  • 15,076
  • 6
  • 55
  • 70
2

Unfortunately, Visual Studio does not support indentation lines out of the box.

Andrew Hare
  • 344,730
  • 71
  • 640
  • 635
1

These lines are arguably more useful in Python where indentation denotes nesting. In C#, nesting is explicitly marked by curly braces. I feel as though curly braces provide the visual cues I need to see this kind of thing, so you might just try to persevere -- in time the cognitive load associated with glimpses of C# versus glimpses of Python will reach equilibrium.

VS2010 implements the text editor in WPF and there are some examples online of creating plug-ins that augment the text editor area. This could be a fun project without being too difficult.

I am envious of Python's indentation-centric nesting. I wish that the C# compiler supported something like that. I wish that white space was part of the language. It would make tooling support for the language better as well.

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
  • Drew, your assessment seems spot on. However, for some reason, the curly braces throw me off. I feel like I'm constantly trying to figure out where a block of code starts and ends. This could be because I'm relatively new to programming in general. I definitely feel like Python's use of whitespace and indentation makes it much easier to read in comparison to C#'s curly braces. – seedofc Sep 19 '09 at 16:43