문제

When I copy a piece of code and paste it somewhere else in the IDE, my custom code indentation levels are changed by Visual Studio automatically. How do I prevent this?

Example:
enter image description here

My current tab settings are:
enter image description here

I want to continue using the Smart Indenting feature and actual tab characters (not spaces instead of them). I only want to prevent this particular behavior.

도움이 되었습니까?

해결책

It looks like you are using Visual Assist X (a guess from the font highlighting), which does this. VS2012 itself doesn't have this feature so far as I know.

To turn it off in Visual Assist X, under VASSISTX->Visual Assist X Options..., select Advanced->Corrections and uncheck "Format after paste (in C/C++/C#/Javascript)".

enter image description here

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