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