2 " Language: xinetd.conf(5) configuration file
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2006-12-20
6 if exists("b:did_indent")
11 setlocal indentexpr=GetXinetdIndent()
12 setlocal indentkeys=0{,0},!^F,o,O
13 setlocal nosmartindent
15 if exists("*GetXinetdIndent")
21 function s:count_braces(lnum, count_open)
24 let line = getline(a:lnum)
26 let i = match(line, pattern)
28 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'ld\%(Comment\|String\)'
39 let i = match(line, pattern, i + 1)
41 return a:count_open ? n_open : n_close
44 function GetXinetdIndent()
45 let pnum = prevnonblank(v:lnum - 1)
50 return indent(pnum) + s:count_braces(pnum, 1) * &sw
51 \ - s:count_braces(v:lnum, 0) * &sw