We're using the auto formatting feature of IntelliJ to format our code whenever a commit to git is made.
The formatting works well for us except for our designer who's not happy with the way how IntelliJ formats his CSS files. Is there a way to deactivate auto formatting for certain file types?
Since IDEA 13 it is possible to deactivate formatting with
/* @formatter:off */
and reactivate with
/* @formatter:on */
But you need to enable that first in Settings -> Code Style -> General -> Formatter Control
You can also right-click on a file and choose "Mark as Plain Text". When reformatting (Ctrl+Alt+L) these files are then excluded.
This also works in IntelliJ 12.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With