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
3
4 comments

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
Avatar
Permanently deleted user

Hear hear, @Hanns Holger Rutz.

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

2
Avatar
Permanently deleted user

Would be nice if it wouldn't reformat but did increase indentation :-)

0

If you prefer to keep the reformatting feature on, but suppress the reformatting just once, you can do so by copying and pasting a '}' instead of typing it.

0

Please sign in to leave a comment.