Skip to main content
added 96 characters in body
Source Link
Nicolas Raoul
  • 60.4k
  • 65
  • 240
  • 401

You are in the right way, but first of all, you have to customize the XML format:

  • Open Window > Preferences > XML > XML files > Editor.
  • Check format comments and uncheck Join lines. (This should indent comments and remove adjacent blanks and so, preserving the existing newlines. But if you feel uncomfortable with the result, uncheck format comments.)
  • Select Indent using spaces and set the indentation size.

Now you can format your XML files by pressing [SHIFT][CTRL][F].

Eclipse XML Formatting preferences

You are in the right way, but first of all, you have to customize the XML format:

  • Open Window > Preferences > XML > XML files > Editor.
  • Check format comments and uncheck Join lines. (This should indent comments and remove adjacent blanks and so, preserving the existing newlines. But if you feel uncomfortable with the result, uncheck format comments.)
  • Select Indent using spaces and set the indentation size.

Now you can format your XML files by pressing [SHIFT][CTRL][F].

You are in the right way, but first of all, you have to customize the XML format:

  • Open Window > Preferences > XML > XML files > Editor.
  • Check format comments and uncheck Join lines. (This should indent comments and remove adjacent blanks and so, preserving the existing newlines. But if you feel uncomfortable with the result, uncheck format comments.)
  • Select Indent using spaces and set the indentation size.

Now you can format your XML files by pressing [SHIFT][CTRL][F].

Eclipse XML Formatting preferences

added 33 characters in body
Source Link
Little Santi
  • 8.9k
  • 2
  • 22
  • 50

You are in the right way, but first of all, you have to customize the XML format:

  • Open Window > Preferences > XML > XML files > Editor.
  • Check format comments and uncheck Join lines. (This should indent comments and remove adjacent blanks and so, preserving the existing newlines. But if you feel uncomfortable with the result, uncheck format comments.)
  • Select Indent using tabsspaces and set the indentation size.

Now you can format your XML files by pressing [SHIFT][CTRL][F].

You are in the right way, but first of all, you have to customize the XML format:

  • Open Window > Preferences > XML > XML files > Editor.
  • Check format comments and uncheck Join lines. (This should indent comments and remove adjacent blanks and so, preserving the existing newlines. But if you feel uncomfortable with the result, uncheck format comments.)
  • Select Indent using tabs.

Now you can format your XML files by pressing [SHIFT][CTRL][F].

You are in the right way, but first of all, you have to customize the XML format:

  • Open Window > Preferences > XML > XML files > Editor.
  • Check format comments and uncheck Join lines. (This should indent comments and remove adjacent blanks and so, preserving the existing newlines. But if you feel uncomfortable with the result, uncheck format comments.)
  • Select Indent using spaces and set the indentation size.

Now you can format your XML files by pressing [SHIFT][CTRL][F].

Source Link
Little Santi
  • 8.9k
  • 2
  • 22
  • 50

You are in the right way, but first of all, you have to customize the XML format:

  • Open Window > Preferences > XML > XML files > Editor.
  • Check format comments and uncheck Join lines. (This should indent comments and remove adjacent blanks and so, preserving the existing newlines. But if you feel uncomfortable with the result, uncheck format comments.)
  • Select Indent using tabs.

Now you can format your XML files by pressing [SHIFT][CTRL][F].