matlab.vim (835B)
1 " Vim filetype plugin file 2 " Language: matlab 3 " Maintainer: Jake Wasserman <jwasserman at gmail dot com> 4 " Update By: Gabriel Dupras 5 " Last Change: 2021 Aug 30 6 7 " Contributors: 8 " Charles Campbell 9 10 if exists("b:did_ftplugin") 11 finish 12 endif 13 let b:did_ftplugin = 1 14 15 let s:save_cpo = &cpo 16 set cpo-=C 17 18 if exists("loaded_matchit") 19 let s:conditionalEnd = '\%(\%(^\|;\)\s*\)\@<=end\>' 20 let b:match_words= 21 \ '\<\%(if\|switch\|for\|while\|try\)\>:\<\%(elseif\|case\|break\|continue\|else\|otherwise\|catch\)\>:' . s:conditionalEnd . ',' . 22 \ '\<function\>:\<return\>:\<endfunction\>' 23 unlet s:conditionalEnd 24 endif 25 26 setlocal suffixesadd=.m 27 setlocal suffixes+=.asv 28 setlocal commentstring=%\ %s 29 30 let b:undo_ftplugin = "setlocal suffixesadd< suffixes< commentstring< " 31 \ . "| unlet! b:match_words" 32 33 let &cpo = s:save_cpo 34 unlet s:save_cpo