sponsor Vim development Vim logo Vim Book Ad

octave.vim : Another syntax highlighting file for octave

 script karma  Rating 39/18, Downloaded by 1982  Comments, bugs, improvements  Vim wiki

created by
Francisco Castro
 
script type
syntax
 
description
This script is based in the matlab syntax file, however it adds a few significant features:

* Supports the octave syntax, including things like endwhile, the # comment, the strings delimited by ' and ", etc.

* Highlights the predefined functions like normal_cdf, sqrt, etc...

* Highlights any functions defined in the file being editted, for example if you are editting a file containing something like this:

function my_function()
  ...
endfunction

it will highlight appearances of my_function in the current file.
 
install details
The installation procedure is:

1) mkdir -p ~/.vim/syntax
2) Copy octave.vim to ~/.vim/syntax/
3) Then add the following lines to your ~/.vimrc

" Copy from here

" Octave Syntax
augroup filetypedetect
  au! BufRead,BufNewFile *.m,*.oct setfiletype octave
augroup END

" to here.
 

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
octave.vim 1.2 2007-07-05 7.0 Francisco Castro The version 1.1 couldn't handle a trailing backslash when defing a function. Now it's fixed.
octave.vim 1.1 2006-11-02 7.0 Francisco Castro It fixes a typo and minor changes. Also it's tested with vim7 and works.
ip used for rating: 216.73.216.169

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