In eclipse you can click Ctrl+I at any line, and it\'ll automatically indent the line or group of lines according to the indentation scheme you chose i
If you want auto-indent just like Emacs does it on TAB, i.e. indent the current line and move the cursor to the first non-whitespace character, do this:
Insert the following macro code:
reindent-line caret-line-first-column caret-begin-line
Click "Set Shortcut" and press TAB