Search code examples
intellij-ideaformattingindentation

Intellij idea indent on wrap


My current formatting makes too much intend when wrapping line in XML file. I get this:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

but I want this

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

I tried changing continuation indent in Code Style -> General and in Code Style -> XML but none worked.


Solution

  • You have to un-tick the Align attributes in order to have continuation indentation to work.

    enter image description here