Partially disable autoformatting in NetBeans

I start using netbeans and leave an eclipse (aptana in my case).

Over time, I used type tags @format:offand @format:onto disable / enable the automatic formatting of some parts in the PHP file.

Is there a way to do the same on netbeans? some annotation, some special comment or something else?

Examples, I suppose, I have this awful code:

class A {
public function foo() {
$aux = array("key1" => 1,"key2" => "omega"
);
//@format:off
echo "<pre>";
var_dump($aux);die;
//@format:on
return $aux;}}

And when I press the magic short cut (Alt + Shift + F), I want to get the following:

class A {
    public function foo() {
        $aux = array(
                "key1" => 1,
                "key2" => "omega"
        );
        //@format:off
echo "<pre>";
var_dump($aux);die;
        //@format:on
        return $aux;
    }
}

If you look closely, the debugging code will remain on the left side.

+4
source share

All Articles