Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried to change the width of indentation of my Eclipse IDE to 2 via Preferences -> General -> Editors -> Text Editors -> Displayed Tab Width.

However, when I press tab or shift + tab, I still indent or un-indent by 4 spaces. Why? This still occurs even after restarting Eclipse.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

If you search in preferences for the code formatter, I think you will find what you're looking for. It should be located under: Java > Code Style > Formatter

There should be a tab labeled Indentation with the settings which you seek to tweak.

enter image description here

Also, see here for how to set up the formatter to auto-format your code with Ctrl+Shift+F.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.