1

I'm looking for a way to automatically format Javascript object literals in IntelliJ IDEA. I checked Settings > Code style > Javascript but couldn't find anything like this there.

Let me give an example of what I want. I want this:

var a = { prop1: 'abc', prop2: 'def'
         , prop3: 'ghi' };

to be automatically formatted like so:

var a = {
    prop1: 'abc',
    prop2: 'def',
    prop3: 'ghi'
}

I'm using IDEA 12.0.3.

1 Answer 1

3

There is a related feature request, star/vote to track the progress.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, just upvoted that feature request :) If nobody answers with anything more useful I will mark this as the accepted answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.