[eclipse] Eclipse keyboard shortcut to indent source code to the left?

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?

This question is related to eclipse keyboard-shortcuts

The answer is


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


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


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


control + shift + F will do the work


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


I thought it was Shift + Tab.


Tab to indent right by four characters


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


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.


For Left indent Shift + Tab

For Right indent simple Tab


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"


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);
}

Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to keyboard-shortcuts

Collapse all methods in Visual Studio Code Is there a keyboard shortcut (hotkey) to open Terminal in macOS? Jupyter/IPython Notebooks: Shortcut for "run all"? Any way (or shortcut) to auto import the classes in IntelliJ IDEA like in Eclipse? How do I duplicate a line or selection within Visual Studio Code? How do I search for files in Visual Studio Code? OS X Terminal shortcut: Jump to beginning/end of line window.close() doesn't work - Scripts may close only the windows that were opened by it Comment shortcut Android Studio Column/Vertical selection with Keyboard in SublimeText 3