What is the Auto-Alignment Shortcut Key in Eclipse?

EclipseAlignmentEclipse 3.4

Eclipse Problem Overview


What is the auto-alignment shortcut key in Eclipse?

Eclipse Solutions


Solution 1 - Eclipse

Ctrl+Shift+F to invoke the Auto Formatter

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

Solution 2 - Eclipse

Auto-alignment? Lawful good?

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

Solution 3 - Eclipse

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.

Solution 4 - Eclipse

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

Solution 5 - Eclipse

auto-alignment shortcut key Ctrl+Shift+F

to change the shortcut keys Goto Window > Preferences > Java > Editor > Save Actions

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPraveenView Question on Stackoverflow
Solution 1 - EclipsePeter PerháčView Answer on Stackoverflow
Solution 2 - EclipseJoeyView Answer on Stackoverflow
Solution 3 - EclipsedjeikybView Answer on Stackoverflow
Solution 4 - EclipsejaiView Answer on Stackoverflow
Solution 5 - EclipseAkitha_MJView Answer on Stackoverflow