indent of comments with Visual Studio 2015
I have looked and searched for ways to disable indentation of comments when I save C# files in Visual Studio 2015 with Resharper 9.0.0.0 installed.
I'd like to pseudocode before I start writing actual code. However I have been tweaking with both Visual studio's and Resharper's settings to no avail. So for example I want the comments to look like:
private string ToggleString(string input)
{
// If input.length is between 1-100
// All the uppercase letters converted to lowercase.
// All the lowercase letters converted to uppercase
// else
// Return a constructive message.
return input;
}
When I save CTRL + s it turn out like this:
private string ToggleString(string input)
{
// If input.length is between 1-100
// All the uppercase letters converted to lowercase.
// All the lowercase letters converted to uppercase
// else
// Return a constructive message.
return input;
}
How do I disable the auto-format?
In VS 2017 (C++) there is a checkbox for this.
Tools | Options | Text Editor | C/C++ | Formatting | Indentation | Preserve indentation of comments
Unchecking it fixed annoying comment auto-formatting. Maybe the same option exists in VS 2015.
I don't think its possible to just omit inline comments formatting and still do other code cleanup.
You can try maybe moving to XML Doc comments and try with the setting as in the picture
链接地址: http://www.djcxy.com/p/39388.html上一篇: iOS系统声音未播放