What is the auto-alignment shortcut key in Eclipse?
5 Answers
Ctrl+Shift+F to invoke the Auto Formatter
Ctrl+I to indent the selected part (or all) of you code.
-
8I was hoping for something that would align = signs across several lines of assignment statements. :(– David J.Aug 11, 2011 at 3:19
-
1hi Peter thank you for sharing information this is useful for edit format document file .. Oct 28, 2013 at 10:39
-
I wonder why they put "CTRL + ALT + L (Win)" as the answer out there.... developer.android.com/sdk/installing/…– gumuruhMay 29, 2014 at 5:13
-
@DavidJames: for aligning on a special character or string, see djeikyb's answer for the plugin Columns4Eclipse Aug 25, 2015 at 12:29
-
1
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.
-
2
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
-
Can I work with one formatter profile and save with another formatter. Mar 22, 2012 at 19:13
auto-alignment shortcut key Ctrl
+Shift
+F
to change the shortcut keys Goto Window > Preferences > Java > Editor > Save Actions