The Format preferences panel is opened from menu Window > Preferences > Author > Editor > Format.
The following options are available:
Detect indent on open - The editor detects the indent settings of
the open XML document. This way you can correctly format (pretty-print) files that were
created with different settings, without changing your options every time you edit such a
file. Besides, you can activate the option for detecting the maximum line width used by the
formatting and hard wrap mechanism. These features were designed to minimize the differences
created by the Format and Indent operation when working with a
versioning system, like CVS for example.
Note: If the document contains different-size
indents, the application computes a weighted average value.
Indent with tabs - When checked, sets the
indent size to a tab unit. When unchecked, the application uses space
characters to form an indent. The number of space characters that form a tab
is defined by the Indent size option.
Indent size - Sets the number of space characters or the tab size
that equals a single indent. An indent can be a number of spaces or a tab, selectable
using the Indent With Tabs option. For example, if set to 4, one tab equals:
either 4 space characters, if the Indent With Tabs option is
unchecked;
or one tab that spans 4 characters, if the Indent With Tabs
option is checked.
Hard line wrap - When enabled, Oxygen XML breaks the edited line
automatically when its length exceeds the maximum set line width. This feature allows you to
neatly edit a document.
Indent on Enter - If enabled, Oxygen XML indents the new line
introduced when pressing the Enter key.
Enable Smart Enter - If you press the Enter key between a start and
an end tag, Oxygen XML places the
cursor in an indented position on the empty line formed between the start and end tag.
Detect line width on open - Detects the line width automatically
when the document is opened.
Format and indent the document on open - When enabled, an XML
document is formatted and indented before opening it in the editor panel. This option
applies only to documents associated with the XML editor.
Line width - Format and Indent - Defines the point at which the
Format and Indent (pretty-print) function performs hard line
wrapping. For example, if set to 100, after a Format and Indent
action, the longest line will have at most 100 characters.
Clear undo buffer before Format and Indent - If checked, you cannot
undo anymore editing actions that preceded the Format and Indent
operation. Only modifications performed after you have performed the operation can be
undone. Check this option if you encounter out of memory problems
(OutOfMemoryError) when performing the Format and
Indent operation.