"Reformat Code..." is destroying my comments
When I comment a line(s) of code by using Ctrl + \, and then later use the "Reformat Code..." feature, ReSharper keeps indenting the commented lines incorrectly. This is driving me absolutely insane.
I've attached a screenshot of what my commented line of code looks like before and after using "Reformat Code..." so you can see what ReSharper is screwing up.
In my "after.png" screenshot, you'll see that ReSharper is taking the whole commented line and shoving it inward.
What can I do to stop this from happening? I've got large sections of code that I comment out from time to time, and ReSharper is destroying the indentation and making my code very hard to read.
Attachment(s):
before.png
after.png
Please sign in to leave a comment.
Hello Matt,
Consider checking "Other\Don't indent comments started at first column" option
on C#\FormattingStyle\Other pane of ReSharper/Options.
Best regards,
Andrey Simanovsky
Thanks, Andrey. That worked.
Is there a way to get the same behavior when using the native Visual Studio 2005 "Format Document" command (Ctrl + K + D) ?
AFAIK, in native VS format there is no option for that. Though, you may want
to play with Tools/Options/Text Editor/C#/Formatting tabs subtree.
Best regards,
Andrey Simanovsky