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 10if exists("b:did_ftplugin") 11 finish 12endif 13 14" Don't load another plugin for this buffer 15let b:did_ftplugin = 1 16 17" Using line continuation here. 18let s:cpo_save = &cpo 19set cpo-=C 20 21let b:undo_ftplugin = "setl fo< com< cms< | unlet! b:browsefilter" 22 23" Set 'formatoptions' to format all lines, including comments 24setlocal 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 29setlocal comments=:;,:;//,:;\ //,s:;\ /*\ ,m:;\ \ *\ ,e:;\ \ */ 30setlocal commentstring=;\ //\ %s 31 32" Win32 can filter files in the browse dialog 33if 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" 37endif 38 39let &cpo = s:cpo_save 40unlet s:cpo_save 41