The Format preferences panel is opened from menu .
The Format Preferences Panel
The formatting preferences are the following:
- Detect indent on open - The editor tries to detect the indent
settings of the opened XML document. In this way you can correctly format (pretty-print)
files that were created with different settings, without changing your options. More than
that you can activate the advanced option for detecting the maximum line width to be used
for formatting and hard wrap. These features were designed to minimize the differences
created by the pretty print operation when working with a versioning system, like CVS for
example.
- Indent with tabs - When checked enables Indent with
tabs to set the indent to a tab unit. When unchecked, the indent will measure
as many spaces as needed in order to go to the next tab stop position. The maximum number of
space characters is defined by the Indent size option.
- Indent size - Sets the number of spaces or the tab size that will
equal a single indent. The indent can be spaces or a tab, selected by the preference
Indent with tabs. For example if set to 4 one tab will equal 4
white spaces or 1 tab with size of 4 characters depending on the value of the
Indent with tabs option.
- Hard line wrap - This feature saves time when writing an XML
document with long lines. You can set a limit for the length of the lines in your document.
When this limit is exceeded the editor will insert a new line before the word that breaks
the limit, and indent the next line. This will minimize the need of reformatting the
document.
- Indent on Enter - If checked, it indents the new line introduced
when pressing Enter.
- Enable Smart Enter - If checked, it inserts a new indented line
between start and end tag when Enter is pressed.
- Detect line width on open - If checked, it detects the line width
automatically when the document is opened.
- Format and indent the document on open - When checked, an XML
document will be formatted and indented before opening it in the editor panel. This option
applies only to documents associated with the XML editor, not to documents associated with
the XSD editor, RNG editor or XSL editor. This option does not
apply on read-only documents when the Can edit read only
files option is disabled.
- Line width - Format and Indent - Defines the point at which the
Format and Indent (pretty-print) function will perform hard line
wrapping. So if set to 100 pretty-print will wrap lines at the 100th space inclusive of
white spaces, tags and elements.
- 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 when performing the Format and Indent operation.