sponsor Vim development Vim logo Vim Book Ad

Mathematica Syntax File : Syntax highlighting file for Mathematica code

 script karma  Rating 21/11, Downloaded by 1114    Comments, bugs, improvements  Vim wiki

created by
steve layland
script type
[ Note, as of May 2005,  this is included in Vim7 ]

This file greatly extends the old Mathematica syntax highlighting that has traditionally come with vim.  It has substantial support for Mathematica patterns, operators, and includes comments notation goodies, such as special function comments beginning with (**.  Try it out and let me know what you think.

Add autoindenting vimscript #1274, salt and pepper to taste.
install details
Install instructions are also in the file.


   * Drop mma.vim into $HOME/.vim/syntax/
     (%HOME%\vimfiles\syntax\ for Windows)

   * Open a Mathematica file**

**Note that both Mathematica and Matlab use .m file extensions, so if you are editing Mathematica .m files, you need to either manually :set ft=mma or edit your filetype.vim file.

I use the following autocommand in filetype.vim:

   au! BufRead,BufNewFile *.m      set ft=mma sw=2

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
mma.vim 1.3 2005-05-19 6.0 steve layland * Added a bunch of keywords
* Cleaned up for addition to vim build
mma.vim 1.2 2005-05-06 6.0 steve layland * forgot map... teehee
mma.vim 1.2 2005-05-06 6.0 steve layland Quick fixes.
* Special comment titles correctly terminate
* emphasis only for words
mma.vim 1.1 2005-05-05 6.0 steve layland * Fixed some overly greedy highlighting inside of comments.
* Added a bunch of keywords for symbols not often used as Functions (like String, GoldenRatio, etc...)
* Will tackle folding next.
mma.vim 1.0 2005-05-04 6.0 steve layland Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo