8

I have a project which has quite large files, ~55000 lines per file. (don't ask why)

Well, anytime I try to copy (!! Not paste !!) a part of text in a .CS file, I'm getting a dialog box saying Formatting which stays for 3-5 seconds. Is getting pretty frustrating.

Is there an option to disable this?

1

2 Answers 2

10

You may disable through the following:

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

(You can typically find the "Options" button under the "Tools" and/or "Debug" menu depending on your user interface configurations)

This will improve performance a bit. But, it is known bug after the last update and you won't be able to copy immediately.

3
6

ilkerkaran's solution didn't work for me, so I kept Googling and found out this is part of the Productivity Power Tools extension. Far from increasing my productivity, it prevented me from copy/pasting my code entirely!

Here's the solution I found:

Go to Extensions > Manage Extensions > Search for HTML > Copy As HTML > Disable

Then, restart Visual Studio. It seems to have fixed this problem for me after YEARS of dealing with this thinking there was no solution after the above solution didn't work!

(this is a link to what clued me in: https://developercommunity.visualstudio.com/content/problem/251912/htmlcopy-formatting-document-for-copying.html)

This answer is specific to Visual Studio Community 2019, your mileage may vary.

Note: This precludes the need to turn off format on paste, which is a feature I quite like.

1
  • 1
    thank you, this helped me. Best search in the installed Extensions, so you actually get to the option to disable it.
    – SwissCoder
    Mar 5, 2021 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.