Vertically indent code in Visual Studio?

Asked

Viewed 65 times

1

In addition to this question, I come here to ask: how do I do the same process in IDE of Visual Studio? (this does not hold for Code! ) Since, automatically it transforms from it:

var small_var        = "hello, world!";
var big_named_var    = "foo, bar";

for that reason:

var small_var = "hello, world!";
var big_named_var = "foo, bar";

Is there any way to make the first passage equal always?

Preferably specify which version of Visual Studio works on. This goes for both 2015, 2017 and 2019.

  • 2

    Tag !code

  • @THIAGODEBONIS that question is for Visual Studio Code, that’s from Visual Studio. There is a difference between the two. I quoted this in the question.

2 answers

1


  • 1

    The answer is not the link, but it is this option: E.g. in C# you will need to disable: Tools->Options->Text Editor->C#->Formatting->Spacing->"Ignore spaces in declaration statements".

0

There is the VS own indentation by right-clicking and selecting "Format Document", another way is by pressing :

"ALT + SHIFT + F"

. None of those options suit you? If not answer take a look at the link : Better Align- Visual Studio

  • This opened me the tools menu...

  • But none of them makes the AP specific in question, right?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.