开发者

Visual Studio Extension for Code Alignment [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 5 years ago.

Improve 开发者_高级运维this question

Is there any free extension to perform code alignment, like Align Assignments with Productivity Power Tools but to align this code:

public int ID;
public string Title;
public string Text;
public decimal Factor;

in that way, or something like that?

public int      ID;
public string   Title;
public string   Text;
public decimal  Factor;


As Pop Catalin said, Code alignment is what you're after. It's my extension, sorry for not much documentation. It's something that's so much easier to explain with videos, but I'm still to get around to it.

When you align by string it finds the first instance of the string and lines them up. For example if you were to enter '=' then

foo = bar;
foobar = foo;

would become

foo    = bar;
foobar = foo;

However, your code doesn't have a common delimiter - except for the space before it. So you can use Align By Space (from the toolbar or ctrl + =, ctrl + space, but you'll have to remove what's already assigned to ctrl + =). Align By Space uses your caret location (you can still select the row you want to align, or let the extension figure it out) and aligns by the first space on each line after your caret location.

Hope that makes sense!


You can try Code alignment ;)

P.S. I haven't tried it myself but it looks like it does what you need, so if it's good you can leave a comment here, so more people will know.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜