Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ - Suppress code auto-formatting

IntelliJ 14 always wants to format my code on save. Normally this is fine, but if I'm working on a file that's very poorly formatted, I'd rather it not do this. Otherwise, my changes get lost among the formatting changes. Is there a way to turn this off, either selectively or even permanently? The only thing I could find were the "@formatter" tags, which are enabled, but even when I put the whole file inside those tags, IntelliJ still wants to format it.

like image 688
Mac Avatar asked Dec 05 '25 08:12

Mac


1 Answers

There we go. What I was seeing was not full formatting, but only IntelliJ stripping trailing spaces. Once I found that setting and changed it from "All" to "Modified Lines", the saves were no longer intrusive.

like image 191
Mac Avatar answered Dec 08 '25 06:12

Mac



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!