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
Please sign in to leave a comment.
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.
Hear hear, @Hanns Holger Rutz.
The setting is now in File -> Settings -> Editor -> General -> Smart Keys -> Reformat block on typing '}'
Would be nice if it wouldn't reformat but did increase indentation :-)
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.