Wed 19 March 2014


TextMate Bundle for PROV-N

The Provenance Notation (PROV-N) has been my chosen representation when it comes to writing provenance. It has a relatively low cognitive cost and easier for humans to read (at least to me), compared to other provenance representations. Even so, I usually found myself making mundane mistakes and typos and have had to repetitively rely on the Provenance Validator to check my provenance for syntactical errors. Hence the motivation to find a tool to help write provenance faster with less mistakes.

Here comes TextMate!

TextMate is a powerful text editor on Mac (which I have only used it lightly, on and off). It provides support for numerous text file formats thanks to the flexible extensibility it offers. Having discovered how to define a new language in TextMate, I set off trying to find a way to alleviate my pains with PROV-N authoring right away. To cut the story short, here is the results.

Screenshot of TextMate with PROV-N syntax highlighting

If you like what you see, grab the PROV-N TextMate bundle from my github repository. An installation of TextMate, of course, is required.

PROV-N Snippets In addition to the PROV-N syntax highlighting, another bonus provided by the bundle is the tab-triggered snippets for all PROV-N statements. For example, you can just type wd⇥ ( is the tab key) to get wasDerivedFrom(, , -, -, -, []). The list of all snippets is on the right (or look them up in the Bundles > Provenance Notation menu in TextMate). Please note though that the PROV attributes snippets are available only between the square brackets (i.e. the attributes block) in a statement.

Disclaimer: The bundle is my very first attempt and there are many issues remained. Please don't expect it supports all possible valid PROV-N statements.

If you are working with PROV-N, I hope you will find this TextMate bundle useful. Contributions and suggestions are very welcome.

For Sublime Text users: You can install the PROV-N language grammar in Sublime Text to get the same syntax highlighting as shown above. To do this, download and copy the file to the User package folder (Menu: Preferences > Browse Packages...)

Update: A JavaScript code editor supporting the PROV-N syntax is now available. See this post.

Go Top
comments powered by Disqus