xref: /vim-8.2.3635/runtime/ftplugin/matlab.vim (revision 6c391a74)
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
10if exists("b:did_ftplugin")
11	finish
12endif
13let b:did_ftplugin = 1
14
15let s:save_cpo = &cpo
16set cpo-=C
17
18if 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
24endif
25
26setlocal suffixesadd=.m
27setlocal suffixes+=.asv
28setlocal commentstring=%\ %s
29
30let b:undo_ftplugin = "setlocal suffixesadd< suffixes< commentstring< "
31	\ . "| unlet! b:match_words"
32
33let &cpo = s:save_cpo
34unlet s:save_cpo
35