Visual studio auto-indent for variable assignments

c#, visual-studio

Solution

You can install the Productivity Power Tools extension and press CTRL+ALT+] (see the `Align Assignments` section on that page). (Edit - doesn't seem to support VS2013 preview but I'll leave it here for others who are using 2010/2012).

Alternatively, you could try using the Code alignment extension. This claims to support VS2013.

Both options require a non-express edition of Visual Studio as express editions don't support extensions.

Problem

I know VS could do that, but i can't remember the operation name nor the shortcut for it... Visual studio does the following: Before: ``` string a = "bliblablubb"; string ab = "bliblablubb"; string abc = "bliblablubb"; string abcd = "bliblablubb"; ``` After: ``` string a = "bliblablubb"; string ab = "bliblablubb"; string abc = "bliblablubb"; string abcd = "bliblablubb"; ``` I am currently using VS2013 preview.

Original source

Related problems