matlab.vim 754 B

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