I wish to disable all code formatting in Visual Studio 2010, with the in开发者_开发百科tention of selectively switching options back on as I see fit.
Currently I have a specific problem that refuses to go away; When I add the final brace in the code block below, Visual Studio 2010 reformats the code for the entire switch statement above that point, placing each line against the margin (removes leading whitespace on each line). I've switched off every setting in Tools/Options/C#/Formatting to no avail. Is there an overriding 'Disable all formatting' option? Thanks.
switch(fractionalDigits)
{
case 0:
if(significand > 107374u)
{
if(truncateRange)
{
significand = 1073741823u;
}
else
{
result = FixedPointDecimal.Null;
return false;
}
}
else
{
UPDATE: The specific problem above was caused by additional formatting options being added by the Power Tools. The additional formatting options seem to interact with the built in logic an odd way.
Tools > Options > Text Editor > C# > Formatting > Indentation > Indent case labels
You could try the following: Create a color theme with nearly no color. So you could readjust each code elements color step by step.
You can use the following tool to generate a no color theme: Theme generator
Set the constrast to the left and main and foreground color to white.
精彩评论