Search code examples
intellij-ideaphpstormwebstormjetbrains-idegoland

How to remove unnecessary blank line on code formatting in IntelliJ?


Is it possible to remove empty/blank lines using code formatting in Intellij IDEA?


Solution

  • Yes. It is possible to configure the number of blank lines in the settings menu (CTRL+ATL+S): File -> Settings -> Editor -> Code Style -> Java(or Scala or whatever your language is) -> Blank Lines

    Blank lines configuration