By default Eclipse indents with a hard tab character. How do I change it to spaces?
Eclipse – How to change Eclipse to use spaces instead of tabs
eclipseformattingtabswhitespace
Related Topic
- Eclipse – How to you speed up Eclipse
- Convert tabs to spaces in Notepad++
- Eclipse – How to show line numbers in Eclipse
- Java – ‘Must Override a Superclass Method’ Errors after importing a project into Eclipse
- Eclipse HotKey: how to switch between tabs
- Java – Eclipse: Set maximum line length for auto formatting
- Java – How to change font size in Eclipse for Java text editors
- Eclipse – How to change the Eclipse default workspace
Best Answer
Java Editor
Spaces only
[Note: If necessary save profile with a new name as the default profile cannot be overwritten.]
Default Text Editor
Before version 3.6:
Version 3.6 and later:
Note that the default text editor is used as the basis for many non-Java editors in Eclipse. It's astonishing that this setting wasn't available until 3.3.
C / C++
Spaces only
HTML
CSS
Follow the same instructions for HTML, but select CSS Files instead of HTML Files.
JSP
By default, JSP files follow the formatting preferences for HTML Files.
XML
XML files spacing is configured in Preferences.