visual-studio-2015

Avoid formatting code on paste Visual Studio 2015


When I copy and paste the code with Visual Studio, it will auto-format the pasted code (for example, it removes some extra spaces that I have intentionally added for clarity)

I just want that the code is pasted as I copied it, just like a normal text editor does. What I copy it's what I paste :)

Is it possible to just disable the auto-format on paste?

Thanks!


Solution

  • For completeness - a workaround is to first toggle line comment, cut, paste and remove the line comments again. A bit cumbersome, but works if it is just needed occasionally and with keyboard shortcuts also not too much additional work.