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 - Group Multiline Alignment for assignment in JavaScript
Summary: Group Multiline Alignment for assignment in JavaScript
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Linux
: P1 normal with 2 votes (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-04 21:28 UTC by stuardo
Modified: 2015-12-28 13:41 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.