1.File --> Setting --> Editor --> General --> Virtual Space --> All placementof caret after end of line 取消勾选

2.File --> Setting --> Editor --> General --> Other --> Strip trailing spaces on Save 选择 All

3.File --> Setting --> Editor --> General --> Other --> Always keep trailing on create line 取消勾选

--> Apply --> Ok

去掉 idea 行尾空格

去掉 idea 行尾空格

 

相关文章: