1 if exists("b:did_ftplugin")
6 if findfile("Makefile", ".;/") != ''
7 let &l:makeprg="make -f ".findfile("Makefile", ".;/")
10 function! XCodeFold(lnum)
11 let line = getline(a:lnum)
12 if line =~ '^.pragma mark -'
15 if line =~ '^.pragma mark'
21 function! XCodeFoldText()
22 let text = v:folddashes . " [ "
23 let text .= substitute(getline(v:foldstart), '#pragma mark ', '', 'g')
24 let text .= " ] " . string(v:foldend - v:foldstart + 1) . " lines "
28 setl foldexpr=XCodeFold(v:lnum)
29 setl foldtext=XCodeFoldText()