Eclipse keyboard shortcut to indent source code to the left?

EclipseKeyboard Shortcuts

Eclipse Problem Overview


I've looked in the keyboard shortcuts list in Eclipse but can't find keyboard shortcut to indent source code to the left. Surely there is one?

Eclipse Solutions


Solution 1 - Eclipse

In my copy, Shift + Tab does this, as long as I have a code selection, and am in a code window.

Solution 2 - Eclipse

Ctrl + I (indentation). See at http://www.rossenstoyanchev.org/write/prog/eclipse/eclipse3.html Search for Indentation.

Solution 3 - Eclipse

You can use Ctrl + Shift + F which will run your formatter on the file and fix indentations along the way also.

Solution 4 - Eclipse

I thought it was Shift + Tab.

Solution 5 - Eclipse

control + shift + F will do the work

Solution 6 - Eclipse

For Left indent Shift + Tab

For Right indent simple Tab

Solution 7 - Eclipse

In any version of Eclipse IDE for source code indentation.

Select the source code and use the following keys

  1. For default java indentation Ctrl + I

  2. For right indentation Tab

  3. For left indentation Shift + Tab

Solution 8 - Eclipse

Obviously this is only for Pydev, but I've worked out that you can get the very useful functions "Shift Right" and "Shift Left" (mapped by default to CTRL+ALT+. and CTRL+ALT+,) to become useful by changing their keybindings to "Pydev Editor Scope" from "Pydev View"

Solution 9 - Eclipse

On Mac (on french keyboard its) cmd + shift + F

Solution 10 - Eclipse

Tab to indent right by four characters

Solution 11 - Eclipse

i'd rather go to menu source em click on "Cleanup Document"

Solution 12 - Eclipse

for me the default is Shift + Tab,

you can select the text you want, press Shift + Tab to shift everything on the left, selecting all and pressing Tab shifts everything to the right.

Solution 13 - Eclipse

For Mac Users who using Eclipse Use Cmd + I(Indent) and Cmd + F(Format). But I had worst experience with Cmd + F which breaks the code in to several lines as follows

String A = MyClass.getA(x, y);
if (A != null) {
    A = Long.parseLong(0);
}

Where my original code is as follows

String A = MyClass.get(x, y);
if (A != null) {
    A = Long.parseLong(0);
}

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
QuestionLowFatTwinkieView Question on Stackoverflow
Solution 1 - EclipsejwismarView Answer on Stackoverflow
Solution 2 - EclipseOren NitzanView Answer on Stackoverflow
Solution 3 - EclipseyellavonView Answer on Stackoverflow
Solution 4 - EclipseCookieOfFortuneView Answer on Stackoverflow
Solution 5 - EclipseRaghuView Answer on Stackoverflow
Solution 6 - EclipseHassanUsmanView Answer on Stackoverflow
Solution 7 - Eclipseuser3227986View Answer on Stackoverflow
Solution 8 - EclipsejjisnowView Answer on Stackoverflow
Solution 9 - EclipseSwap-IOS-AndroidView Answer on Stackoverflow
Solution 10 - EclipserakeshView Answer on Stackoverflow
Solution 11 - EclipseheavyrickView Answer on Stackoverflow
Solution 12 - EclipsethahgrView Answer on Stackoverflow
Solution 13 - EclipseVishnu Prasanth GView Answer on Stackoverflow