Last week I announced the release of a new version of PreviewMarkdown that will preview YAML front matter in Markdown files. Work on that release prompted me to code a new app that enables QuickLook previews and Finder icon thumbnails of YAML files.
I have a quite few YAML files that configure a number of projects, mostly websites built using the Hugo static-site generator, and it’s really handy to be able to select one in Finder and quickly view its contents just by hitting space. Thumbnails are nice to see too, but for me it’s the QuickLook preview functionality that I most value because it saves me a heck of lot of time opening files in an editor just to read a line or two — or even just see if this is the file I’m looking for.
With PreviewYaml, I can now tell in a moment.
PreviewYaml works just like PreviewMarkdown: it’s a host app that makes preview preferences accessible and a pair of app extensions that are called by Finder when you ask for a preview, or open a window containing one or more
.yaml files. If you try it yourself, you need to run the app to register the extensions with macOS, and to apply any particular settings you want, such as preview font and size, the colour of keys so they stand out from their values, how much indentation you prefer, and whether bad YAML is displayed in the preview its raw form or ignored.
You can also use the main app to submit feedback and bug reports, and you can check out the app’s known issues. These are under investigation, but I think will only affect a very, very small number of users. But please let me know if I’m wrong in that assumption!
PreviewYaml is available from the Mac App Store for a very modest consideration, and the core source can be viewed on GitHub.