Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355036 - [formatter] New-line and indent after commas in var declaration
Summary: [formatter] New-line and indent after commas in var declaration
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement with 7 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL: https://github.com/eclipse/webtools.j...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-18 04:17 EDT by Martin CLA
Modified: 2015-01-15 15:17 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin CLA 2011-08-18 04:17:12 EDT
Would it be possible to get the JavaScript formatter to line-break after commas in multiple-variable declarations, and to then indent the following lines?

Currently:

var myVar = 'test', hisVar = 'real', herVar = 'live';

Ideally (if the formatting comes out right):

var myVar = 'test',
    hisVar = 'real',
    herVar = 'live';

This would then conform nicely with the standard JSLint practice of declaring all at the front.