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

Eugene picture Eugene · Jun 20, 2012 · Viewed 44.9k times · Source

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

Answer

Vic picture Vic · Jun 20, 2012

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