Text editor vertical lines on statements

后端 未结 5 716
被撕碎了的回忆
被撕碎了的回忆 2021-01-03 23:51

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

相关标签:
5条回答
  • 2021-01-03 23:56

    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.

    0 讨论(0)
  • 2021-01-03 23:57

    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.

    enter image description here

    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.

    enter image description here

    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.

    0 讨论(0)
  • 2021-01-03 23:57

    For Visual Studio 2017 VB.NET: Tools > Options > Text Editor > Basic > Adv.. > Block Structure Guides: check 'em

    0 讨论(0)
  • 2021-01-04 00:03

    Have a look at the indent guides extension, this can do what I think you want.

    0 讨论(0)
  • 2021-01-04 00:13

    (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)

    0 讨论(0)
提交回复
热议问题