octave.vim : Syntax highlighting for GNU Octave
| script karma
Downloaded by 2590
Comments, bugs, improvements
script versions (upload new version)
|Syntax highlighting for GNU Octave. It inherits the Matlab syntax highlighting and adds a few extra things like endif etc.|
|Installation details from Paul Laub - thanks Paul!
Here's what to do to get octave.vim working.
1. Put octave vim in vim's syntax subdirectory.
2. Directory above this subdirectory is the main vim directory. Find
the file named filetype.vim. Change "matlab" to "octave". With that,
files with the *.m extension will be associated with octave.vim. Test
by opening an octave file in vim. Keywords like endfunction should be
3. (Optionally) modify the file synmenu.vim to include an Octave item
in the syntax menu of the GUI version of vim. [I don't use menus so I
can't say more about how to do this.]
Also, since your script inherits formatting done by the matlab.vim
file, I'd advise people NOT to delete matlab.vim and rename
octave.vim to matlab.vim.
An alternative is to copy octave.vim to ~/.vim/syntax and add the following to ~/.vimrc:
" Octave Syntax
au! BufRead,BufNewFile *.m setfiletype octave
Click on the package to download.
ip used for rating: 18.104.22.168
||I forgot to add end_switch, so I've just added that one. The only thing I think is missing is multiline strings, but I don't know how to do that. (If you do please help me)