Editing YAML Documents
Oxygen XML Editor Eclipse plugin includes a specialized YAML editor with various editing features for
files that have the
yaml/yml file extension. It includes the usual text editing actions, syntax highlighting, automatic validation, and formatting and indenting. Oxygen XML Editor Eclipse plugin also includes a document template to help you get started with YAML
documents. The template is called YAML and it can be found in the
New Document folder in the New from templates
wizard.Tip: You can experiment with a sample of a
YAML file available at:
[OXYGEN-INSTALL-DIR]/samples/yaml/personal.yaml.
Format and Indent YAML Documents
Oxygen XML Editor Eclipse plugin includes support for formatting and indenting
YAML documents. You can trigger a format and indent operation for your YAML document using
the
Format and Indent toolbar
button.
Some of the formatting actions that are performed include:
- Indents the document with the indent size specified in the preferences page.
- Removes empty lines and extra spaces between keys and values.
- Compacts the string values (for example, description) and limits it to 80 characters on a row.
To batch format/indent multiple YAML files, select and right-click the
files in the Project Navigator view, then select
Format and Indent
Files.