comparison runtime/indent/eruby.vim @ 1620:73fe8baea242

updated for version 7.2a
author vimboss
date Tue, 24 Jun 2008 21:16:56 +0000
parents f58cb9bf1260
children 0b796e045c42
comparison
equal deleted inserted replaced
1619:b9740fb41986 1620:73fe8baea242
41 endif 41 endif
42 42
43 function! GetErubyIndent() 43 function! GetErubyIndent()
44 let vcol = col('.') 44 let vcol = col('.')
45 call cursor(v:lnum,1) 45 call cursor(v:lnum,1)
46 let inruby = searchpair('<%','','%>') 46 let inruby = searchpair('<%','','%>','W')
47 call cursor(v:lnum,vcol) 47 call cursor(v:lnum,vcol)
48 if inruby && getline(v:lnum) !~ '^<%' 48 if inruby && getline(v:lnum) !~ '^<%'
49 let ind = GetRubyIndent() 49 let ind = GetRubyIndent()
50 else 50 else
51 exe "let ind = ".b:eruby_subtype_indentexpr 51 exe "let ind = ".b:eruby_subtype_indentexpr
68 let ind = ind - &sw 68 let ind = ind - &sw
69 endif 69 endif
70 return ind 70 return ind
71 endfunction 71 endfunction
72 72
73 " vim:set sw=2 sts=2 ts=8 noet ff=unix: 73 " vim:set sw=2 sts=2 ts=8 noet: