3

My question is a duplicate of: How to turn off the Eclipse code formatter for certain sections of Java code? but for IntelliJ.

Does a similar feature exist for IntelliJ?

Koray Tugay
  • 22,894
  • 45
  • 188
  • 319

1 Answers1

3

Yes, and It works the same way with:

@formatter:off

and

@formatter:on

Navigate to:

Settings > Editor > Code Style > Formatter control

enter image description here

syncdk
  • 2,820
  • 3
  • 25
  • 31
  • This breaks javadoc when used inside javadoc comments: `error: unknown tag: formatter:on` – Alex Jun 01 '21 at 10:59