11

I chose YAML over XML as a format to store our input and output data. It works well, but now I'm discovering one of YAML's main weaknesses: editor/viewer support.

I need help to simplify the viewing of potentially large YAML files by coworkers. Here are some of the programs they might use:

  • browsers (firefox, chrome, IE)
  • vim
  • nedit
  • emacs
  • eclipse
  • komodo
  • slickedit

I'm most interested in using browsers to view the YAML because that would cover everyone, but solutions for any of those other editors would also be helpful. The less customization required by the user, the better!

Anyone know of browser plugins or have any other tips for viewing YAML?

Thanks in advance!

user1111991
  • 111
  • 1
  • 5
  • You have vim on your list, and there are a couple of vim plugins for YAML. Have you had a look at this: http://www.vim.org/scripts/script.php?script_id=739 – Trygve Jan 28 '14 at 20:03

2 Answers2

3

In vim you should look at Folding. See http://vim.wikia.com/wiki/Folding The default method of indent based folding should be sufficient for YAML.

  • :set foldmethod=indent
  • zo opens/expands/unfolds
  • zc collapses/closes/folds
Jeremy Woodland
  • 3,444
  • 5
  • 17
  • 25
0

For eclipse you can use

https://marketplace.eclipse.org/content/yaml-editor/

which supports folding (but must be enabled in preferences) or you just use the quick outline Ctrl + Shift + o and type identifer as shown in example - here *city was used to show up only those parts of document. Pressing Enter will jump to the coresponding part.

screenshot showin quickoutline in yaml editor plugin

PS: I am the maintainer of the plugin

de-jcup
  • 1,402
  • 12
  • 27