IntelliJ adding empty lines for every linebreak
Answered
When I open my code files in a simple text editor, they are displayed in a normal fashion. But when I open them with IntelliJ, there are additional empty lines after every linebreak, so between lines which are printed underneath each other normally there is one empty line. When there are 2 empty lines between to codelines in the original, IntelliJ makes that 4 empty lines. Upon saving, those 4 empty lines persist. How can I stop this?
Version Info:
Build #IU-241.14494.240, built on March 28, 2024
Runtime version: 17.0.10+8-b1207.12 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11
Please sign in to leave a comment.
Hello, Tobias Jung.
Could you please check the line separator settings for the files you encounter problems with? Could there be any hidden symbols in the files?
I figured I have to open those files in LF for things to work out . I set the global option “LIne sepeartor” to \n, but when I open a file, the bar you just screenshotted shows RF nevertheless
Tobias Jung, the general option you mentioned is applied to the new files only; you can see the hint under it. So, if you want the existing file to be opened with the separator, you should change it in the status bar.