home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / runtime / dos / ftplugin / msmessages.vim < prev    next >
Encoding:
Text File  |  2010-08-14  |  1.2 KB  |  41 lines

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