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