What is the Auto-Alignment Shortcut Key in Eclipse?

自作多情 提交于 2019-11-26 23:48:07

问题


What is the auto-alignment shortcut key in Eclipse?


回答1:


Ctrl+Shift+F to invoke the Auto Formatter

Ctrl+I to indent the selected part (or all) of you code.




回答2:


Auto-alignment? Lawful good?

If you mean formatting, then Ctrl+Shift+F.




回答3:


The answer that the OP accepted is wildly different from the question I thought was asked. I thought the OP wanted a way to auto-align = signs or + signs, similar to the tabularize plugin for vim.

For this task, I found the Columns4Eclipse plugin to be just what I needed.




回答4:


Want to format it automatically when you save the file???

then Goto Window > Preferences > Java > Editor > Save Actions

and configure your save actions.

Along with saving, you can format, Organize imports,add modifier ‘final’ where possible etc



来源:https://stackoverflow.com/questions/2378258/what-is-the-auto-alignment-shortcut-key-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!