1 " Vim filetype plugin file
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
4 " Last Change: 2007 Sep 25
6 " Only do this when not done yet for this buffer
7 if exists("b:did_ftplugin")
11 " Don't load another plugin for this buffer
12 let b:did_ftplugin = 1
14 " Using line continuation here.
18 let b:undo_ftplugin = "setl fo< com< ofu< | if has('vms') | setl isk< | endif"
20 " Set 'formatoptions' to break comment lines but not other lines,
21 " and insert the comment leader when hitting <CR> or using "o".
22 setlocal fo-=t fo+=croql
24 " Set completion with CTRL-X CTRL-O to autoloaded function.
26 setlocal ofu=ccomplete#Complete
29 " Set 'comments' to format dashed lists in comments.
30 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
32 " In VMS C keywords contain '$' characters.
37 " When the matchit plugin is loaded, this makes the % command skip parens and
39 let b:match_words = &matchpairs
40 let b:match_skip = 's:comment\|string\|character'
42 " Win32 can filter files in the browse dialog
43 if has("gui_win32") && !exists("b:browsefilter")
45 let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
46 \ "C Header Files (*.h)\t*.h\n" .
47 \ "C Source Files (*.c)\t*.c\n" .
48 \ "All Files (*.*)\t*.*\n"
50 let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" .
51 \ "C Header Files (*.h)\t*.h\n" .
52 \ "C Source Files (*.c)\t*.c\n" .
53 \ "All Files (*.*)\t*.*\n"
55 let b:browsefilter = "C Source Files (*.c)\t*.c\n" .
56 \ "C Header Files (*.h)\t*.h\n" .
57 \ "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" .
58 \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
59 \ "All Files (*.*)\t*.*\n"