When I write .xml files in Eclipse, I often have to manually indent code. For example
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
After formatting it looks like this.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
How to automate this? I can't find formatting settings in Eclipse for XML.
CTRL + A
to select the entire text and thenCTRL + SHIFT + F
– Bluecollar