Javascript formatting?

Is it possible to get Intellij to align = signs when declaring a bunch of variables in javascript?

Do


var xxxx = 1;
var yyy   = 2;


or


var xxxx = 1,
     yyy   = 2;


that would be capital.

5 comments

I don't think that's possible right now for JavaScript.
(Only for Java there's an option in "Wrapping and Braces" called "Field groups -> Align in columns".)

Starting with IDEA 11 there is a feature that aligns properties like this

var foo = {
    xxxx: 1,
    y   : 2
}


but there's no similar formatting option vor variable declarations.

I propose you have a look at http://youtrack.jetbrains.net to see if there's already such a feature request and vote on it.
Else file a new issue.

0

I don't think there is a separate feature request for that but there are plans to implement it.

0

should i go ahead and create the feature request then?  Is there a timeline for this?

0

It's up to you. But it makes sense if you want to follow its status.

0

Most likely it will be in the next version, roughly in spring. No precise dates yet though.

0

Please sign in to leave a comment.