views:

581

answers:

1

By default IntelliJ IDEA 7.0.4 seems to use 4 spaces for indentation in XML files. The project I'm working on uses 2 spaces as indentation in all it's XML. Is there a way to configure the indentation in IntelliJ's editor?

+5  A: 

Sure there is. This is all you need to do:

  • Go to
File -> Settings -> Global Code Style -> General
  • Disable the checkbox next to 'Use same settings for all file types'
  • The 'XML' tab should become enabled. Click it and set the 'tab' (and probably 'indent') size to 2.
Huppie