Accepted answer

ctrl+shift+f to invoke the auto formatter

ctrl+i to indent the selected part (or all) of you code.


auto-alignment shortcut key ctrl+shift+f

to change the shortcut keys goto window > preferences > java > editor > save actions


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


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.


auto-alignment? lawful good?

if you mean formatting, then ctrl+shift+f.

Related Query

More Query from same tag