Search code examples
javaintellij-idea

How to disable intellij auto change my code format?


When I edit the java source code, intellij will auto format my code besides the places I edit, how to disable that ?


Solution

  • In the latest IntelliJ Idea (2021.3), Auto formatting can be stopped for one or more file type by going to

    Preferences -> Tools -> Actions on save -> Enable or Disable Reformatting action for one or more file type