Alexander Pogrebnyak
Alexander Pogrebnyak

Reputation: 45576

How do I change tab size for XML files in Eclipse?

I would like to have a tab size for regular text files be '4'. And I know where to set it (Preferences->General->Editors->Text Editors: Displayed tab width).

However, for XML files I want to set the tab width to '2'.

I tried Structural Text Editors, Content Types, File Associations to no avail.

I am using the latest version of Eclipse Indigo.

Upvotes: 3

Views: 3306

Answers (1)

Puneet
Puneet

Reputation: 736

Under Preferences -> XML -> XML Files -> Editor you can set the indentation size and you can also select whether to use tabs/spaces for indentation.

Upvotes: 3

Related Questions