[英]Disable auto-indent of comments with Visual Studio 2015
当我在安装了Resharper 9.0.0.0的Visual Studio 2015中保存C#文件时,我查看并搜索了禁用注释缩进的方法。
在开始编写实际代码之前,我想要伪代码。 然而,我一直在调整Visual Studio和Resharper的设置无济于事。 所以例如我希望评论看起来像:
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;
}
当我保存CTRL + s时 ,结果如下:
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;
}
如何禁用自动格式?
在VS 2017(C ++)中,有一个复选框。
工具| 选项| 文字编辑器| C / C ++ | 格式化| 缩进| 保留评论缩进
取消选中它修复了恼人的评论自动格式化。 也许VS 2015中存在相同的选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.