Lines Matching +refs:indent +refs:line +refs:function
1 " Vim indent file
9 runtime! indent/ruby.vim
17 " Only define the function once.
29 function! GetHamlIndent()
34 let line = substitute(getline(lnum),'\s\+$','','')
36 let lastcol = strlen(line)
37 let line = substitute(line,'^\s\+','','')
38 let indent = indent(lnum)
39 let cindent = indent(v:lnum)
41 let indent = cindent < indent ? cindent : indent - &sw
43 let increase = indent + &sw
44 if indent == indent(lnum)
45 let indent = cindent <= indent ? -1 : increase
50 if line =~ '^!!!'
51 return indent
52 elseif line =~ '^/\%(\[[^]]*\]\)\=$'
56 elseif line =~ '^'.s:tag.'[&!]\=[=~-]\s*\%(\%(if\|else\|elsif\|unless\|case\|when\|while\|until\|for\|begin\|module\|class\|def\)\>\%(.*\<end\>\)\@!\|.*do\%(\s*|[^|]*|\)\=\s*$\)'
58 elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$'
60 elseif line == '-#'
62 elseif group =~? '\v^(hamlSelfCloser)$' || line =~? '^%\v%('.g:haml_self_closing_tags.')>'
63 return indent
69 return indent