Skip to content

shadanan/mathematica-tmbundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

Installation

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 http://github.com/shadanan/mathematica-tmbundle.git 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)

Snippets

  • 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 + .)

About

A TextMate bundle for Mathematica package files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published