PacificNW_Lover
PacificNW_Lover

Reputation: 5384

IntelliJ IDEA - Remove empty line at End of File using hot keys

Am using IntelliJ IDEA Ultimate 2019.3 on macOS Catalina 10.15.4.

Trying to figure out how to NOT have an empty line when I conduct a cmdoptionl via the hot keys.

Unformatted:

Unformatted File


After conducting cmdoptionl, its still unformatted (lines 10 and 11 are still visible):

enter image description here


This is what I am seeking after issuing cmdoptionl:

enter image description here


As you can see, I do not want an empty line / newline inserted after the last closing } brace of a Java class.

Upvotes: 4

Views: 2784

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 402423

There is an option to enforce an empty line at the end of file, but there is no the opposite option at the moment.

If this option exists in any third-party formatters, you could try a plug-in or an external tool that will apply it (like Eclipse Code Formatter).

Upvotes: 5

Related Questions