문제

Sometimes it would be convenient if I could temporarily turn off the auto formatting feature of Visual Studio, do some editing stuff and then turn it on again.

I don't want to go the long way into the options menu to do this.

Do you know a shortcut, addin or anything to do this?

Or maybe I can surround a section of my code with something like "#pragma dontformat" to tell the editor not to format this code?

도움이 되었습니까?

해결책 2

The answer for pasting is CTRL[Z].

When you paste a block of code, it gets pasted and then auto formatted. Hitting CTRL[Z] the 1st time will undo the auto formatting but leave the original pasted text. Hitting CTRL[Z] the 2nd time will then undo the pasted text as you'd expect.

I'm using Visual Studio 2013 - haven't tried this in earlier versions.

다른 팁

Unfortunately there are no Pre-Defined shortcuts for this purpose so you have to do it manually.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top