sponsor Vim development Vim logo Vim Book Ad

Mathematica Indent File : Indentation file for Mathematica code

 script karma  Rating 8/2, Downloaded by 1083  Comments, bugs, improvements  Vim wiki

created by
steve layland
 
script type
indent
 
description
[ Note: As of May 2005, this is included in Vim7 ]

This is a simple file that allows rudimentary auto indenting of Mathematica code.  Combine it with vimscript #1273, it makes editing Mathematica package code a breeze.
 
install details
  * copy this file to $HOME/.vim/indent/mma.vim
    (%HOME%\vimfiles\indent\mma.vim 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.1 2005-05-07 6.0 steve layland * mo betta indenting
* doesn't indent { if &si==1
mma.vim 1.0 2005-05-04 6.0 steve layland Initial upload
ip used for rating: 216.73.216.147

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github