postscr.vim 1006 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. " Vim filetype plugin file
  2. " Language: PostScript
  3. " Maintainer: Mike Williams <mrw@eandem.co.uk>
  4. " Last Change: 24th April 2012
  5. " Only do this when not done yet for this buffer
  6. if exists("b:did_ftplugin")
  7. finish
  8. endif
  9. " Don't load another plugin for this buffer
  10. let b:did_ftplugin = 1
  11. let s:cpo_save = &cpo
  12. set cpo&vim
  13. " PS comment formatting
  14. setlocal comments=b:%
  15. setlocal formatoptions-=t formatoptions+=rol
  16. " Define patterns for the matchit macro
  17. if !exists("b:match_words")
  18. let b:match_ignorecase = 0
  19. let b:match_words = '<<:>>,\<begin\>:\<end\>,\<save\>:\<restore\>,\<gsave\>:\<grestore\>'
  20. endif
  21. " Define patterns for the browse file filter
  22. if has("gui_win32") && !exists("b:browsefilter")
  23. let b:browsefilter = "PostScript Files (*.ps)\t*.ps\n" .
  24. \ "EPS Files (*.eps)\t*.eps\n" .
  25. \ "All Files (*.*)\t*.*\n"
  26. endif
  27. let b:undo_ftplugin = "setlocal comments< formatoptions<"
  28. \ . "| unlet! b:browsefiler b:match_ignorecase b:match_words"
  29. let &cpo = s:cpo_save
  30. unlet s:cpo_save