NetBeans, Turn off **ANY** auto indentation / auto formatting

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.


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.

链接地址: http://www.djcxy.com/p/25440.html

上一篇: C ++中不必要的花括号?

下一篇: NetBeans,关闭** ANY **自动缩进/自动格式化