eclipse xml editor inserts tabs for spaces

Steps:

  • Open Eclipse -> Preferences
  • Go to XML -> XML Files -> Editor
  • Select the Indent using spaces option

enter image description here


Go to Windows > Preferences > XML > XML Files > Editor and select Indent using spaces:

enter image description here


Not sure about this issue with the XML editor specifically, but I use the AnyEdit tools plugin to handle any tabs/spaces issues.

Once you've installed the plugin go to Preferences -> General -> Editors -> AnyEdit Tools and you can enable auto conversion of tabs to spaces (or vice versa) whenever you save a file. I find this very useful because it will also fix any files you've accidentally inserted tabs into when you change those files.

This plugin also provides a nice set text functions to use in the 'Convert' section of the right click menu of any text editor.