occam.vim 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. " Vim filetype plugin file
  2. " Language: occam
  3. " Copyright: Christian Jacobsen <clj3@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk>
  4. " Maintainer: Mario Schweigler <ms44@kent.ac.uk>
  5. " Last Change: 23 April 2003
  6. " Only do this when not done yet for this buffer
  7. if exists("b:did_ftplugin")
  8. finish
  9. endif
  10. let b:did_ftplugin = 1
  11. let s:keepcpo= &cpo
  12. set cpo&vim
  13. "{{{ Indent settings
  14. " Set shift width for indent
  15. setlocal shiftwidth=2
  16. " Set the tab key size to two spaces
  17. setlocal softtabstop=2
  18. " Let tab keys always be expanded to spaces
  19. setlocal expandtab
  20. "}}}
  21. "{{{ Formatting
  22. " Break comment lines and insert comment leader in this case
  23. setlocal formatoptions-=t formatoptions+=cql
  24. setlocal comments+=:--
  25. " Maximum length of comments is 78
  26. setlocal textwidth=78
  27. "}}}
  28. "{{{ File browsing filters
  29. " Win32 can filter files in the browse dialog
  30. if has("gui_win32") && !exists("b:browsefilter")
  31. let b:browsefilter = "All Occam Files (*.occ *.inc)\t*.occ;*.inc\n" .
  32. \ "Occam Include Files (*.inc)\t*.inc\n" .
  33. \ "Occam Source Files (*.occ)\t*.occ\n" .
  34. \ "All Files (*.*)\t*.*\n"
  35. endif
  36. "}}}
  37. "{{{ Undo settings
  38. let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<"
  39. \ . " formatoptions< comments< textwidth<"
  40. \ . "| unlet! b:browsefiler"
  41. "}}}
  42. let &cpo = s:keepcpo
  43. unlet s:keepcpo