aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/c.vim
blob: bc531a6114fd7da5c44e100d8916242ea19bbb27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
" Set 'commentstring', 'define', and 'include' back to their default C-friendly values
setlocal commentstring&vim define&vim include&vim
let b:undo_ftplugin .= '|setlocal commentstring< define< include<'

" Include macros in completion
setlocal complete+=d
let b:undo_ftplugin .= '|setlocal complete<'

" Fold based on indent level, and start with all folds closed
setlocal foldmethod=indent
setlocal foldlevel=0
let b:undo_ftplugin .= '|setlocal foldmethod< foldlevel<'

" Include system headers on UNIX
if has('unix')
  setlocal path+=/usr/include
  let b:undo_ftplugin .= '|setlocal path<'
endif