By default Eclipse indents with a hard tab character. How do I change it to spaces?
Change Eclipse to Use Spaces Instead of Tabs – How to Guide
eclipseformattingtabswhitespace
eclipseformattingtabswhitespace
By default Eclipse indents with a hard tab character. How do I change it to spaces?
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.