This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256993

Summary: Group Multiline Alignment for assignment in JavaScript
Product: javascript Reporter: stuardo
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal CC: stuardo
Priority: P1    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description stuardo 2015-12-04 21:28:40 UTC
In the Editor / Formatting / Language: PHP, Category: Alignment / Group Multuiple Alignment , there is a  [ ] Assignment option. This allows me to make more readable code like this:

$foo    = foo();
$fooBar = fooBar();

where the equal sign is aligned in both lines. There is no option in the Language: JavaScript to do the same. Every time I type:

var foo    = foo();
var fooBar = fooBar();

The IDE rewrites the lines removing the spaces before the equal sign in the firs line.
Comment 1 stuardo 2015-12-06 23:25:07 UTC
This also happens for defining an object. If I type

var app  = new MyApp({
    quitOnError: true,
    email:       user,
    password:    pass
});

After saving the document, the spaces are rewritten to 

var app  = new MyApp({
    quitOnError: true,
    email: user,
    password: pass
});
Comment 2 Petr Pisl 2015-12-28 13:41:35 UTC
This is not implemented yet. Marking as enhancement. 
Thanks.