visual-studio-2015

Visual Studio 2015: How To Maintain Spacing After Copy Paste


I align my assignment operators like such:

enter image description here

However when I copy paste I get this:

enter image description here

Do you know what setting I can set to have Visual Studio 2015 maintain spacing with a copy-paste?


Solution

  • Adjust formatting option to your liking. In particular to disable formattin on paste:

    Tools->Options->Text Editor->C#->Formatting -> "Automatically format on paste".