How do I stop IntelliJ IDEA 2020.2.1 (macOS version) from removing empty lines (only whitespaces) when saving files?
已回答
I've been trying to setup IntelliJ so that it does NOT strip out lines that only whitespaces when saving. But I'm not having any luck.
At the moment, I am editing a .java class and my indents keeps on disappearing. I've added a screenshot on the changes I've made to preferences.
Thanks!
link to idea.log: https://pastebin.com/raw/tFnrAm94

请先登录再写评论。
Hello,
If you have
.editorconfigfiles in your project, the option can also be controlled via those files (ij_any_keep_indents_on_empty_linesandtrim_trailing_whitespaceparameters). Settings from the.editorconfigfile will overwrite IDE settings, so if you have such files in your project, you will have to either remove the setting or disable the EditorConfig bundled plugin completely if you don't need it.It may also be a caching issue. Try restarting IDEA using the File | Invalidate Caches & Restart option.