3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2011-03-14
6 if exists("b:did_indent")
11 setlocal indentexpr=GetTreetopIndent()
12 setlocal indentkeys=0{,0},!^F,o,O,=end
13 setlocal nosmartindent
15 if exists("*GetTreetopIndent")
19 function GetTreetopIndent()
20 let pnum = prevnonblank(v:lnum - 1)
25 let ind = indent(pnum)
26 let line = getline(pnum)
28 if line =~ '^\s*\%(grammar\|module\|rule\)\>'
32 let line = getline(v:lnum)
33 if line =~ '^\s*end\>'