In Emacs when I hit tab anywhere on a line, the line will indent correctly (or at least to the mode settings). When I hit tab again it will move back to the next block. When programming Python this really helps since closing a block is done by lowering the indention level.
Is there a way to configure Eclipse to do the same?
开发者_如何学JAVACurrently, I have to erase the leading white space then hit tab.
This question is a reposting of a superuser question.
Try ctrl-i (Cmd-i on osx) to indent the current line or a selection inside eclipse (if you're using default key binds as opposed to emacs). Or, if you want a different key bind, go to Appearances > General > Keys and change the bind for Correct Indentation
to key(s) of your choice
In Eclipse, go to Windows -> Preference -> Java -> Formatter.
In Active Profile drop down box, select any profile, click Edit on right of it.
In Profile Dialog box opened, you can change a lot of things like Indentation, New Line, Braces, White Spaces etc.
Alternatively, if your profile is altogether different than standard one, Create a new active profile and then edit it accordingly.
精彩评论