Created: 2008-04-13 17:46
Updated: 2018-06-18 16:52
License: mit

The Gnuplot TextMate bundle

See this screencast for quick installation instructions (may be out of date!).

TextMate 2

This bundle was originally written for TM 1, and while I've made some changes to improve compatibility, some things may not work in TextMate 2. Work from prior to these changes is on the unmaintained tm1 branch.

Please feel free to send pull requests if you make any edits.


Aims to provide a useful set of commands, snippets and language support for writing and running gnuplot scripts within TextMate.

So far, various features have been implemented, including:

  • Syntax hilighting.
  • Script execution -- pressing ' ⌘R' pipes the script through gnuplot.
  • Plot in aquaterm -- pressing also ''⌘R' gives you the option of viewing the plot in aquaterm.
  • Execution and display -- we now have a command for running a script and showing the result in aquaterm.
  • Output viewing -- pressing '⇧⌘O' will search though the script and open any filenames it finds after set output statements.
  • Output the current file to a PDF file and specify the file name in the plot file
  • Toggling (un)set -- pressing '⇧⌘S' changes toggles between set and unset keywords on the current line.
  • Online help -- pressing '⌃H' with the caret over a keyword pops up an HTML window containing gnuplot's built-in help for that keyword.

There are a couple of issues with the help, see the end of the fillstyle entry, for example, but these are minor, and seem to be due to bugs in bluecloth.

Future work will be focused on providing completion, and improving the help command -- especially formatting of the output.




cd ~/Library/Application\ Support/TextMate/Bundles

or, if you want to edit the bundle, use

cd ~/Library/Application Support/Avian/Bundles/


git clone git:// Gnuplot.tmbundle

Saving the Output of a script to a PDF file

You can specify a file name directly in the script and use ⌘R to execute the script. From the options choose save to PDF. To specify a name in the script put the following line in the beginning of you document:


The script will parse for this option and save the generated PDF to your directory. If you choose not to specify a name, the name of the current document will be used.


Matt Foster : homepage


Some functionality merged in from gnuplot-textmate-bundle on GitHub.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more