What is the Auto-Alignment Shortcut Key in Eclipse

2019-01-16 00:38发布

What is the auto-alignment shortcut key in Eclipse?

4条回答
你好瞎i
2楼-- · 2019-01-16 00:58

Auto-alignment? Lawful good?

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

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-01-16 01:05

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.

查看更多
你好瞎i
4楼-- · 2019-01-16 01:06

Ctrl+Shift+F to invoke the Auto Formatter

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

查看更多
在下西门庆
5楼-- · 2019-01-16 01:24

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

查看更多
登录 后发表回答