A visual YAML editor
YAML is a structured data format that is widely used for its readability, especially in configuration files and other software inputs. Most major languages have packages that parse their data structures into and out of YAML. It is a format that often bridges the gap between technical subject matter experts and software engineers - for example, between clinical data SMEs and data system architects.
To maintain its readability, YAML is finicky about indentation and bullet characters. This is often manageable by using smart editors that do indentation for you. However, there are groups of users who could benefit from being able to write YAML who are less hip to programming editors and file formats in general. These users can find themselves wanting to make quick changes in a configuration, and wind up in a frustrating cycle of bugs and fixes that they never asked for, having made obscure errors of whitespace syntax.
yeti is intended to help solve this problem and make YAML even more friendly. It can be thought of as a visual editor for YAML. Users can make their desired content changes, as well as comments, and always produce syntactically correct YAML as output. yeti also provides key sorting and other features that editor plugins do not always have.
yeti is an Electron-based stand-alone application. Download and install the package for your system:
Please report bugs and make feature requests as Issues on this repository.
Use menu File > Open (Ctrl- or Cmd-O) to open a YAML file.
Use menu File > New (Ctrl- or Cmd-N) to create an empty YAML document.
The image highlights the following items:
- Entity (object or array) extent line - the items to the right of this line are part of a single entity
- Object - key/value list entity
- Object entry - consists of a text box containing entry key, and an entry value entity following the colon
- Array - ordered list of entities
- Array element - indicated by dash character
- Control - clickable character that enables insertion and deletion at that point in the document
A new YAML document appears as a single selector at the document root. Select object
or array
to set the root item.
Add items (scalars, objects, or arrays) are added to the document by clicking on the controls (green bullets) at the ends of an element, or by clicking into a text field and using Edit > New YAML Item Above and Edit > New Yaml Item Below.
The control changes to an arrow indicating where the new element will appear. Click to insert above; shift-click to insert below.
The new element will appear as a select
dropdown. Choose the item type to insert.
To update text items, place the cursor in the text box and edit as usual.
To delete an item, hold down Cntl or Cmd while clicking the control. The control changes appearance to indicate delete mode.
To sort object entries alphabetically by their keys (within a single object), click into any key text box and select Edit > Sort This Level (F7).
To modify an existing comment, click on the comment text. The comment will appear within an editable text box. Click out of the text box to close the comment.
To add a comment near a given position in the document, click in a text box and select Edit > Add Comment (F12). A number of possible comment positions will appear, indicated by the pound character (#). Click on the desired position and enter the comment as desired. The unused positions will disappear after clicking away from the text box.
The usual Edit > Undo (Ctrl- or Cmd-Z) will undo text changes while entering text in text boxes.
Edit > Undo YAML Edit (Ctrl- or Cmd-Shift-Z) will undo YAML structural edits, including insertion and deletion of YAML entities and sorting.
To show or hide elements below an object key, double click that object key. An ellipsis (...) will appear to indicate the presence of hidden content.
To show or hide all elements at or below a document level, click into a text box (scalar or object key) at the desired level and select View > Select / Hide Level (F8).
To preview the YAML that will be saved, select View > Preview YAML (Ctrl- or Cmd-Y). YAML plain text will appear in a new window.
Save or close the document by selecting File > Save (Ctrl- or Cmd-S) or File > Close (Ctrl- or Cmd-W) as usual.