This preferences page contains various
formatting options which influence editing and formatting both in the
Text and Author modes. To control additional
options specifically for the Author mode editor, see Whitespace Handling in Author Mode.
The following options are available:
- Detect indent on open - Oxygen XML Editor detects how a
document is indented when it is opened. Oxygen XML Editor uses a heuristic method of
detection by computing a weighted average indent value from the initial document content.
You can disable this setting if the detected value does not work for your particular case
and you want to use a fixed-size indent for all the edited documents.
Tip: If you
want to minimize the formatting differences created by the Format and
Indent operation in a document edited in the Text
edited mode, make sure that both the Detect indent on open and
Detect line width on open options are enabled.
- Use zero-indent, if detected - By default, if no indent was
detected in the document, the fixed-size indent is used. Enable this option if all your
document have no indentation and you want to keep them that way.
- Indent with tabs - If selected, indents
are created using tab characters. If unchecked, lines are indented using space
characters.
- Indent size - A fixed number of spaces used for indenting a
line.
- Hard line wrap (Limit to "Line width - Format and
Indent") - If selected, when typing content in the Text
editing mode when the maximum line width is reached, a line break is automatically inserted.
- Indent on enter - If disabled, when you
press the Enter key to insert a line break in the
Textediting mode, no indentation will be added to the new line.
- Enable smart enter - If selected, when you
press the Enter key between a start and an end XML tag in the
Text editing mode, the cursor is placed in an indented position on
the empty line formed between the start and end tag.
- Detect line width on open - When selected, Oxygen XML Editor
detects the line width automatically when the document is opened.
- Format and indent the document on open - When selected, an XML
document is formatted and indented before opening it in Oxygen XML Editor.
- Line width - Format and Indent - Defines the
number of characters after which the Format and Indent
(pretty-print) action 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.
This setting is also used when
saving the XML content edited in the Author editing
mode.
Note: In order to avoid having an indent that is longer than the line width
setting and without having sufficient space available for the text content, the indent
limit is actually set at half the value of the Line width - Format and
Indent setting. The remaining space is reserved for text.
- Clear undo buffer before Format and Indent - The Format
and Indent operation can be undone, but if used intensively, a considerable
amount of the memory allocated for Oxygen XML Editor will be used for storing the undo
states. If this option is selected, Oxygen XML Editor empties the undo buffer before
doing a Format and Indent operation. This means you will not be able
to undo any changes you made before the format and indent operation. Select this option if
you encounter out of memory problems (OutOfMemoryError) when
performing the Format and Indent operation.
The indent size and line width limit settings are used in various places in the
application:
To watch our video demonstration about the formatting options offered by Oxygen XML Editor, go to http://oxygenxml.com/demo/Autodetect_Formating.html.