eclipse排版代码快捷键,怎么设置保存后自动排版

eclipse排版代码快捷键是Ctrl+Shift+f,下面我们看下效果:

这是排版混乱的代码:

然后我们选中,点击Ctrl+Shift+f,排版后的效果:

注:与切换输入法有冲突,会导致快捷键失效,可在source里点击format也能达到相同效果。

保存后自动排版:

window--preference--java-editor--save actions,勾选Perform the selected actions on save和format source code,然后apply

猜你喜欢

转载自blog.csdn.net/qq_40992849/article/details/81110771