Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 65 lines (53 sloc) 1.964 kb
e5c6ef7 updated for version 7.0001
vimboss authored
1 " Vim filetype plugin file
2 " Language: C
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
8cbbb57 Updated runtime files.
Bram Moolenaar authored
4 " Last Change: 2012 Jul 10
e5c6ef7 updated for version 7.0001
vimboss authored
5
6 " Only do this when not done yet for this buffer
7 if exists("b:did_ftplugin")
8 finish
9 endif
10
11 " Don't load another plugin for this buffer
12 let b:did_ftplugin = 1
13
9879df9 updated for version 7.0065
vimboss authored
14 " Using line continuation here.
40daf33 updated for version 7.0090
vimboss authored
15 let s:cpo_save = &cpo
e5c6ef7 updated for version 7.0001
vimboss authored
16 set cpo-=C
17
3d2cce3 updated for version 7.0140
vimboss authored
18 let b:undo_ftplugin = "setl fo< com< ofu< | if has('vms') | setl isk< | endif"
e5c6ef7 updated for version 7.0001
vimboss authored
19
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
23
3d2cce3 updated for version 7.0140
vimboss authored
24 " Set completion with CTRL-X CTRL-O to autoloaded function.
25 if exists('&ofu')
26 setlocal ofu=ccomplete#Complete
27 endif
28
e5c6ef7 updated for version 7.0001
vimboss authored
29 " Set 'comments' to format dashed lists in comments.
30 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
31
32 " In VMS C keywords contain '$' characters.
33 if has("vms")
34 setlocal iskeyword+=$
35 endif
36
efe58cd updated for version 7.2a
vimboss authored
37 " When the matchit plugin is loaded, this makes the % command skip parens and
38 " braces in comments.
f7a78fd Updated runtime files.
Bram Moolenaar authored
39 let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
efe58cd updated for version 7.2a
vimboss authored
40 let b:match_skip = 's:comment\|string\|character'
41
e5c6ef7 updated for version 7.0001
vimboss authored
42 " Win32 can filter files in the browse dialog
8cbbb57 Updated runtime files.
Bram Moolenaar authored
43 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
e5c6ef7 updated for version 7.0001
vimboss authored
44 if &ft == "cpp"
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"
eaaf17b updated for version 7.0014
vimboss authored
49 elseif &ft == "ch"
e5c6ef7 updated for version 7.0001
vimboss authored
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"
54 else
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"
60 endif
61 endif
40daf33 updated for version 7.0090
vimboss authored
62
63 let &cpo = s:cpo_save
64 unlet s:cpo_save
Something went wrong with that request. Please try again.