Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Mathematica Textmate Bundle

TextMate is a popular text editor for Mac OS X. For more information about the editor,
visit Macromates, the author’s web site.

Mathematica is a computational software program used in scientific, engineering, and
mathematical fields and other areas of technical computing. It is created by
Wolfram Research.

This bundle allows TextMate to understand Mathematica .m files.

It was created by David Howell and is being maintained by David Howell and Shad Sharma.

Special thanks to Eric Wort whose invaluable help has saved this developer countless
hours of random debugging.

Also, many thanks to Stephan (stschiff), our newest contributor!


Open up a terminal and navigate to the TextMate bundle folder:
$ cd ~/Library/Application\ Support/TextMate/Bundles
NOTE: You may need to create this folder first.

Clone the bundle’s repository using git:
$ git clone Mathematica.tmbundle

By default, TextMate interprets .m files as Objective-C. You will have to switch the
language to Mathematica in order to activate the bundle.

Stuff That Works

This TextMate bundle is a side project for us and still has a far way to go. It is,
however, being actively developed.

Language Features

  • Operators (there are a lot!)
  • Constants (True, False, Null, Automatic, All)
  • Comments ((* This is a comment *))
  • Lists ({a, b, c})
  • Parts ([[1, 2]])
  • Some function calls (FunctionName[..])
  • Strings ("Hello World!")
  • Symbols (thisIsASymbol)
  • Named patterns (x_)
  • Indentation rules (added by stschiff)


  • SetDelayed (Shift+Enter)
  • Module (module →|)
  • BeginPackage (package →|)
  • Begin … `Private` (begin →|)
  • Do (do →|)
  • For (for →|)
  • If/Condition/True, If/Condition/True/False, If/Condition/True/False/Otherwise (if →|)
  • Map (map →|)
  • Select (select →|)
  • While (while →|)

Other (Commands, Indentation, etc.)

  • Documentation for Current Word (control + H)
  • Block comments (command + /)
  • Reformat current statement / selection (control + Q)
  • Reformat current document (control + shift + Q)
  • Preview current statement / selection in tool tip (control + shift + enter)
  • Command completion (option + escape)
  • Execute current statement / selection (shift + enter)
  • Execute current document (command + R)
  • Reset session and execute current document (command + shift + R)
  • Toggle display of execution times on and off
  • Toogle HTML output between “normal” and “pre”
  • Toggle auto scroll on and off
  • Toggles are saved using Mac OS X “defaults” under com.wolfram.mathmate namespace
  • Clear mathmate session (command + option + .)
  • Quit mathmate kernel (command + control + .)
  • If Mathematica crashes, an exception will be displayed in the MathMate output as follows:
    Connected MathLink program has closed the link, but there might still be data underway.
    At this point, you should use this command to restart the kernel (you will lose previous kernel state).
  • Shutdown mathmate backend (command + shift + control + .)
  • Kill mathmate backend — in case it freezes (command + option + shift + .)


A TextMate bundle for Mathematica package files.







No releases published


No packages published