What is this dashed line called that aligns function blocks in my IDE?

余生长醉 提交于 2019-12-12 10:59:26

问题


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:


回答1:


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.




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/1448843/what-is-this-dashed-line-called-that-aligns-function-blocks-in-my-ide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!