msmessages.vim 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. " Location: http://kevinlocke.name/programs/vim/syntax/msmessages.vim
  6. " Based on c.vim
  7. " Only do this when not done yet for this buffer
  8. if exists("b:did_ftplugin")
  9. finish
  10. endif
  11. " Don't load another plugin for this buffer
  12. let b:did_ftplugin = 1
  13. " Using line continuation here.
  14. let s:cpo_save = &cpo
  15. set cpo-=C
  16. let b:undo_ftplugin = "setl fo< com< cms< | unlet! b:browsefilter"
  17. " Set 'formatoptions' to format all lines, including comments
  18. setlocal fo-=ct fo+=roql
  19. " Comments includes both ";" which describes a "comment" which will be
  20. " converted to C code and variants on "; //" which will remain comments
  21. " in the generated C code
  22. setlocal comments=:;,:;//,:;\ //,s:;\ /*\ ,m:;\ \ *\ ,e:;\ \ */
  23. setlocal commentstring=;\ //\ %s
  24. " Win32 can filter files in the browse dialog
  25. if has("gui_win32") && !exists("b:browsefilter")
  26. let b:browsefilter = "MS Message Files (*.mc)\t*.mc\n" .
  27. \ "Resource Files (*.rc)\t*.rc\n" .
  28. \ "All Files (*.*)\t*.*\n"
  29. endif
  30. let &cpo = s:cpo_save
  31. unlet s:cpo_save