Intellij IDEA formatting XML with aligning attributes

Viewed 913

Is there any chance to format XML files, and some code like this:

<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:longClickable="false"
    >

to be like this?

<RelativeLayout
    android:layout_width  = "fill_parent"
    android:layout_height = "wrap_content"
    android:orientation   = "horizontal"
    android:longClickable = "false"
    >

enter image description here


I've tried the space around "=" option, but that's not what I want.

3 Answers

Unfortunately this is not possible. I've always thought that this is something that would be useful. Your question prompted me to opened a feature request for it: IDEA-117587: XML - Align attribute values Please consider voting for it.

Related