How do I make IntelliJ IDEA insert a new line at every end of file, so that GitHub doesn't complain for example?
There are shortcuts for this in IntelliJ IDEA! Simply hit Shift+Enter to start a new line below the current line or Ctrl+Alt+Enter (⌥⌘Enter on Mac) to start a new line above the current line.
The way Unix regards its general behavior at the end of files is as follows: \n characters don't start lines; instead, they end them. So, \n is a line terminator, not a line separator. The first line (like all lines) needs no \n to start it. The last line (like all lines) needs an \n to end it.
Basically, it's the guide line showing where the wrapping will occur (if enabled for certain code constructions). Show activity on this post.
Change your Editor settings:
Settings → Editor → General → Ensure line feed at file end on Save
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With