In other text editors, such as Notepad++, if statements among other things had a vertical line connecting the if
to the else
, and the else
This feature is now available as part of Visual Studio Productivity Power Tools. This is a free extension from Microsoft.
Productivity Power Tools 2013
Productivity Power Tools 2015
It comes bundled with a large number of other tools which you may or may not want. These features can be enabled or disabled in the Visual Studio options screen under Productivity Power Tools.
This is specifically part of the Structure Visualizer feature, which includes other sub features, such as code outlining in the margin, that can also be enabled or disabled individually.
There is an easier way to get what you want in VS(not sure the versons preceding 2012 has it). For example if you write C++, it's:
Tools >> Options >> Text Editor >> C/C++ >> Outline Statement Blocks
, set it to True.
Then you can find a code block easily if you move mouse to the left column of the code editor. Here is what you get.
It doesn't show the block lines and it doesn't mark the block all the times unless you require it. When you need it, it will mark all the current block out.
For Visual Studio 2017 VB.NET: Tools > Options > Text Editor > Basic > Adv.. > Block Structure Guides: check 'em
Have a look at the indent guides extension, this can do what I think you want.
(Contemporary update)
In Visual Studio 2017 / 2019 (C++, at least), this is the default:
To switch it Off/On: Tools (menu) -> Options -> Text Editor -> General -> Show structure guide lines (checkbox)