Empty braces with newline always reformats as "{}". How to disable?

When using RubyMine to code JavaScript, I often do type this pattern:

    new MyObject({
    });

But as soon as I type the closing curly brace, RubyMine reformats it to:

    new MyObject({});

How can I disable this?  I have searched for this configuration everywhere and can't find anything to disable it.

0
3 comments

Hello Luke,

could you please specify whether you type Enter after first curly brace? In this case the second brace is already added, but it won't reformat the expression to one line. If I misunderstood you then could you please provide a screencast and also screenshot from your Code Style settings for JavaScript.

0

Hi Olga,

I type it like this:  {<ENTER>}.  as soon as I type the 2nd curly brace, it reformats by removing the ENTER and makes it be {}.

 

0

Here's a video showing what is happening:  https://www.youtube.com/watch?v=PG4xJ6dcU_s

 

0

Please sign in to leave a comment.