It is really annoying when you paste a piece of code that is lacking a closing bracket and the whole code file is reformatted. This can be turned off under Tools > Options > Text Editor > C# > Formatting > General. The option to turn off is Automatically format on paste. Similar options are available for other languages under Text Editor > (name of the language).