NetBeans,关闭**任何**自动缩进/自动格式设置
我刚刚尝试了 NetBeans,我真的很喜欢它。
但让我发疯的是可怕的自动代码格式化!
如果我进行缩进,我想要 那个 缩进,但 NetBeans 会继续直接使用“工具”->“工具”中定义的格式样式。选项->编辑->格式化。
举例来说,假设我想要执行以下操作:
namespace cn {
// this has 1 indentation
// this has 2 indentations
class Foo;
}
NetBeans 将其转换为:
namespace cn {
// this has 1 indentation
// this has 2 indentations
class Foo;
}
当键入除 /
之外的任何字符时,它会自动删除 2 个缩进之一。
我是否错过了关闭任何自动缩进的选项?
即使这样,在使用封闭的大括号时,也可能会关闭很好的去缩进功能。
I have just tried out NetBeans and I really like it.
But what drives me crazy is the horrible automatic code formatting !
If I make an indentation, I want that indentation, but NetBeans keeps going straight the formatting style defined in Tools -> Options -> Editor -> Formatting.
Just for example, let's say I want to do the following:
namespace cn {
// this has 1 indentation
// this has 2 indentations
class Foo;
}
NetBeans turns it into:
namespace cn {
// this has 1 indentation
// this has 2 indentations
class Foo;
}
Itdoes automatically remove one of the 2 indentations when typing any character except than /
.
Is there an option I have missed that turns off any auto indentation ?
Even this might turn off the very well de-indentation when using a curly brace closed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我一直在寻找同样的东西,但恐怕答案是否定的。
我正在使用 Netbeans for PHP,如果我进入“工具”->“选项->编辑->格式化有一个选项叫“每个缩进的空格数”,问题是不能设置为0。
至少可以说令人沮丧,因为我本来希望能够在我想使用键盘时随时选择是否缩进。
I was looking for the very same thing and I'm afraid the answer is no.
I'm using Netbeans for PHP and if I go under Tools -> Options -> Editor -> Formatting there is an option called "number of space per indent", the problem is that it can't be set to 0.
Frustrating to say the least, as I would have expected to be able to choose whether to indent or not any time I wanted using my keyboard.