1 " Description: imcc indenter
2 " Author: Andrew Rodland <arodland@entermail.net>
3 " Last Change: 2004 Aug 3
5 " As usual, we want to be alone
6 if exists("b:did_indent")
11 setlocal indentexpr=PIRIndent()
12 setlocal indentkeys=o,O,*<Return>,<bs>,:,=.end,0#
15 return synIDattr(synID(a:lnum, 1, 1), "name") =~? '^myPod$\|^pod[A-Z]'
19 let thisline = getline(v:lnum)
21 let POD_START = '^=[a-z]'
23 if thisline =~? POD_START
32 let LABEL_OR_COMMENT = '^\s*\k\+:\s*$\|^#'
33 if thisline =~? LABEL_OR_COMMENT
39 let lnum = prevnonblank(lnum-1)
40 let prevline = getline(lnum)
42 if prevline !~? LABEL_OR_COMMENT
53 let ind = indent(lnum)
55 let SUB = '^\s*\.pcc_sub\s\+\|^\s*\.sub\s\+'
56 let RETURNBLOCK = '\s*\.pcc_begin_return\s*$'
57 let END = '^\s*\.end\s*$\|^\s*\.pcc_end_return\s*$'
63 if prevline =~? RETURNBLOCK