msmessages.vim 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. " Vim filetype plugin file
  2. " Language: MS Message files (*.mc)
  3. " Maintainer: Kevin Locke <kwl7@cornell.edu>
  4. " Last Change: 2008 April 09
  5. " 2024 Jan 14 by Vim Project (browsefilter)
  6. " Location: http://kevinlocke.name/programs/vim/syntax/msmessages.vim
  7. " Based on c.vim
  8. " Only do this when not done yet for this buffer
  9. if exists("b:did_ftplugin")
  10. finish
  11. endif
  12. " Don't load another plugin for this buffer
  13. let b:did_ftplugin = 1
  14. " Using line continuation here.
  15. let s:cpo_save = &cpo
  16. set cpo-=C
  17. let b:undo_ftplugin = "setl fo< com< cms< | unlet! b:browsefilter"
  18. " Set 'formatoptions' to format all lines, including comments
  19. setlocal fo-=ct fo+=roql
  20. " Comments includes both ";" which describes a "comment" which will be
  21. " converted to C code and variants on "; //" which will remain comments
  22. " in the generated C code
  23. setlocal comments=:;,:;//,:;\ //,s:;\ /*\ ,m:;\ \ *\ ,e:;\ \ */
  24. setlocal commentstring=;\ //\ %s
  25. " Win32 and GTK can filter files in the browse dialog
  26. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  27. let b:browsefilter = "MS Message Files (*.mc)\t*.mc\n" .
  28. \ "Resource Files (*.rc)\t*.rc\n"
  29. if has("win32")
  30. let b:browsefilter .= "All Files (*.*)\t*\n"
  31. else
  32. let b:browsefilter .= "All Files (*)\t*\n"
  33. endif
  34. endif
  35. let &cpo = s:cpo_save
  36. unlet s:cpo_save