Skip to content

Commit

Permalink
Fix silly error in code indent
Browse files Browse the repository at this point in the history
Indent now works a little better but needs more fixes.
  • Loading branch information
jimenezrick committed Sep 2, 2010
1 parent a39e7db commit d0312a1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions ftplugin/erlang.vim
Expand Up @@ -68,8 +68,18 @@ if !exists("*GetErlangFold")
while line =~ s:ErlangBlankLine && 0 != lnum while line =~ s:ErlangBlankLine && 0 != lnum
let lnum = nextnonblank(lnum + 1) let lnum = nextnonblank(lnum + 1)
let line = getline(lnum) let line = getline(lnum)
endwhile endwhile
return lnum return lnum
endfunction

function s:GetPrevNonBlank(lnum)
let lnum = prevnonblank(a:lnum - 1)
let line = getline(lnum)
while line =~ s:ErlangBlankLine && 0 != lnum
let lnum = prevnonblank(lnum - 1)
let line = getline(lnum)
endwhile
return lnum
endfunction endfunction


function s:GetFunName(str) function s:GetFunName(str)
Expand Down Expand Up @@ -130,7 +140,6 @@ if !exists("*GetErlangFold")
if line =~ s:ErlangFunEnd if line =~ s:ErlangFunEnd
return '=' return '='
endif endif
endif
let lnum = s:GetNextNonBlank(lnum) let lnum = s:GetNextNonBlank(lnum)
let line = getline(lnum) let line = getline(lnum)
endwhile endwhile
Expand All @@ -141,7 +150,7 @@ if !exists("*GetErlangFold")
return '=' return '='
endif endif
endif endif
return '1>' return '>1'
endif endif


" End of function (only on . not ;) gives fold level 0 {{{3 " End of function (only on . not ;) gives fold level 0 {{{3
Expand Down

0 comments on commit d0312a1

Please sign in to comment.