2 " Language: xinetd.conf(5) configuration file
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2006-04-19
6 if exists("b:did_indent")
11 setlocal indentexpr=GetXinetdIndent()
12 setlocal indentkeys=0{,0},!^F,o,O
14 if exists("*GetXinetdIndent")
18 function s:count_braces(lnum, count_open)
21 let line = getline(a:lnum)
23 let i = match(line, pattern)
25 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'ld\%(Comment\|String\)'
36 let i = match(line, pattern, i + 1)
38 return a:count_open ? n_open : n_close
41 function GetXinetdIndent()
42 let pnum = prevnonblank(v:lnum - 1)
47 return indent(pnum) + s:count_braces(pnum, 1) * &sw
48 \ - s:count_braces(v:lnum, 0) * &sw