Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Align Assignments
Align Assignments

Align Assignments

Noah Richards

|
17,678 installs
| (9) | Free
Adds a command to visual studio to align assignments. By default, this is bound to Ctrl+Alt+]
Download

This extension adds a command, "Align Assignments", that is bound to Ctrl+Alt+] by default (and placed in the Edit menu).  This command helps you line up assignments by aligning the '=' on each line.  

It takes this:

And turns it into this:

You can use this in two ways:

  1. Place the caret in the middle of a set of assignments and press Ctrl+Alt+].  All the lines in that block (lines above and below that also contain '=') will be lined up.
  2. Same as #1, but make a selection first that spans multiple lines.  This behaves similarly, except that lines that aren't in the selection won't be changed.  You can use this if you only want to align part of a block.

If you are using C#, you should make sure the following option is enabled, so that C# auto-formatting doesn't undo the alignment:

Tools->Options->Text Editor->C#->Formatting->Spacing->"Ignore spaces in declaration statements"

Source code can be found at http://github.com/noahric/AlignAssignments.

 

Version history:

v1.3 - VS2015 support.

v1.2 - VS2013 support.

v1.1 - VS2012 support.

v1.0 - Initial version.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft