当我在MonoDevelop中使用代码格式化(快捷键:Ctrl+I)时,所有内容都会被双重缩进:
namespace Example
{
public class Test
{
public static void Main(string[] args)
{
for (int i = 0; i < 10; i++)
{
Console.WriteLine("{0}: Test", i);
}
//this would be the desired indentation width!
//Not this!
}
}
}
在 源代码 -> 代码格式化 -> C#源代码 下的 文本样式 中检查偏好设置,制表符宽度和缩进宽度都设置为4。尽管如此,我得到了一个缩进宽度为8而不是4的缩进,这意味着有两倍的缩进。
我正在使用MonoDevelop-Unity版本4.0.1与Unity3D团队项目合作。