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")
19 function s:count_braces(lnum, count_open)
22 let line = getline(a:lnum)
24 let i = match(line, pattern)
26 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'ld\%(Comment\|String\)'
37 let i = match(line, pattern, i + 1)
39 return a:count_open ? n_open : n_close
42 function GetXinetdIndent()
43 let pnum = prevnonblank(v:lnum - 1)
48 return indent(pnum) + s:count_braces(pnum, 1) * &sw
49 \ - s:count_braces(v:lnum, 0) * &sw