The Format preferences panel is opened from menu Editor+Format
→ +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.
When checked enables 'Indent with tabs' to set the indent to a tab unit. When unchecked, 'Indent with tabs' is disabled and 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.
Sets the number of spaces or the tab size that will equal a single indent. The Indent can be spaces or a tab, select the preference using the Indent With Tabs option. If set to 4 one tab will equal 4 white spaces or 1 tab with size of 4 characters depending on which option was set in the Indent With Tabs option.
This feature saves time when writing a reach text XML document. 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.
If checked, it indents the new line introduced when pressing Enter.
If checked, it inserts a new indented line between start and end tag.
If checked, it detects the line width automatically when the document is opened.
When checked, the Format and indent the document on open operation will format and indent an XML document 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.
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.
If checked, the undo buffer is cleared. The undo action can now only undo the Format and Indent action
The XML Format preferences panel is opened from menu Editor+Format+XML
→ +When checked, the Format and Indent operation will preserve all empty lines found in the document on which the pretty-print operation os applied.
If checked, the "Format and Indent" (Pretty-Print) function will preserve text nodes as they are without removing or adding any whitespace.
If checked, the "Format and Indent" (Pretty-Print) function will preserve the line breaks found in attributes. When this option is checked, Break long lines option will be disabled.
If checked, the "Format and Indent" (Pretty-Print) function will break long attributes.
If checked, the inline elements will be broken and indented on separate lines if there are whitespace to the left and they follow another element start or end tag.
When checked, the Format and Indent operation will output empty elements with a separate closing tag, ex. <a atr1="v1"></a>. When not checked the same operation will represent an empty element in a more compact form: <a atr1="v1"/>
When checked, the Format and Indent operation will sort the attributes of an element alphabetically. When not checked the same operation will leave them in the same order as before applying the operation.
When checked, the Format and Indent operation will add a space before the closing slash of an empty element, for instance an empty br will appear as <br />.
If checked, the "Format and Indent" (Pretty-Print) function will break the line before the attribute's name.
This list contains simplified XPath expressions for the names of the elements for which the contained white spaces like blanks, tabs and newlines are preserved by the Format and Indent operation exactly as before applying the operation. The allowed XPath expressions are of one of the form:
author
//listing
/chapter/abstract/title
//xs:documentation
The namespace prefixes like xs in the previous example are treated as part of the element name without taking into account its binding to a namespace.
This list contains the names of the elements for which contiguous white spaces like blanks, tabs and newlines are merged by the Format and Indent operation into one blank.
The elements from this list will be treated as mixed when applying the Pretty-Print operation, meaning that the operation will break the line only when whitespaces are encountered.
When checked, the Format and Indent operation will take into account the schema information regarding the space preserve, mixed or element only property of an element.
If checked, automatic tags indentation while editing will take place for all elements including the ones that are excluded from Pretty Print (default behaviour). When unchecked, indentation while editing will not take place in elements that have the 'xml:space' attribute set on 'preserve' or are in the list of Preserve Space Elements.
Indent paste text corresponding to the indent settings set by the user. This is useful for keeping the indent style of text copied from other document.
The default state of the opened editors. For more information see the Locking and unlocking XML markup section.
![]() | Note |
---|---|
Preserve space elements, Default space elements, Mixed content elements and Schema aware format and indent work together. No matter which one indicates a more restrictive property, that property will be applied (if one of them indicates that an element is space preserve then it will be treated accordingly). |
![]() | Note |
---|---|
Preserve empty lines, Preserve text as it is, Preserve line breaks in attributes, Break long attributes, Indent (when typing) in preserve space elements don't apply when switching from Author to Text page. |
This panel displays the special whitespace characters of Unicode. Any character that is checked in this panel is considered whitespace that can be normalized in an XML document. The whitespaces are normalized when the action Format and Indent is applied or when you switch from Text mode to Author mode or from Author mode to Text mode.
The characters with the codes 9, 10, 13 and 32 are always in the group of whitespace characters that must be normalized so they are always enabled in this panel.