1 "this indent function isn't that smart yet, hopefully it'll improve in the future
2 if exists ("b:did_indent")
7 setlocal indentexpr=GetSCIndent()
8 setlocal indentkeys+=0),0],0}
10 if exists ("*GetSCIndent")
14 function GetSCIndent()
16 let curr_line = getline(v:lnum)
17 let lnum = prevnonblank(v:lnum - 1)
23 let prev_line = getline(lnum)
25 let ind = indent(lnum)
27 if prev_line =~ '\(\/\/.*\)\@\<![[({]\s*\([^])}]*\)\=$'
31 if curr_line =~ '\v^\s*[)}\]]'
32 "if synIDattr(synID(line("."), col("."), 0), "name") =~? "scComment" ||
33 " synIDattr(synID(line("."), col("."), 0), "name") =~? "scString" ||
34 " synIDattr(synID(line("."), col("."), 0), "name") =~? "scSymbol"