Disable auto-formatting when entering closing curly brace

Hi there,

I find it a very annoying behaviour that when I close a block with a curly brace }, IntelliJ reformats everything inside the block.

In the attached screen shots, you can see how the alignment of the two case bodies is lost by this action.

Is there a setting somewhere to disable this "feature"?

Thanks, .h.h.



Attachment(s):
Screenshot from 2014-07-04 00:49:16.png
Screenshot from 2014-07-04 00:49:08.png
2 comments
Comment actions Permalink

Actually, in this particular case it looks weird that you need to close curly brace manually. However this problem comes from IDEA platform. You can disable it in IDE Settings -> Editor -> Smart Keys -> Reformat block on typing '}'.
Also it's possble to solve this case by fixing formatting. Can you formulate cases, when you want alignment for '=>'?

Best regards,
Alexander Podkhalyuzin.

4
Comment actions Permalink

Hear hear, @Hanns Holger Rutz.

The setting is now in File -> Settings -> Editor -> General -> Smart Keys -> Reformat block on typing '}'

2

Please sign in to leave a comment.