Permalink
Browse files

Workaround for Vim 7.4's HTML indent

  • Loading branch information...
1 parent 8562472 commit 2470dc83f649949480557bc700e9f9c063a76e7b @AndrewRadev AndrewRadev committed Sep 6, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 indent/eruby.vim
View
@@ -52,6 +52,15 @@ function! GetErubyIndent(...)
let ind = GetRubyIndent(v:lnum)
else
exe "let ind = ".b:eruby_subtype_indentexpr
+
+ " Workaround for Andy Wokula's HTML indent
+ if b:eruby_subtype_indentexpr =~# '^HtmlIndent('
+ \ && exists('b:indent')
+ \ && type(b:indent) == type({})
+ \ && has_key(b:indent, 'lnum')
+ " Force HTML indent to not keep state
+ let b:indent.lnum = -1
+ endif
endif
let lnum = prevnonblank(v:lnum-1)
let line = getline(lnum)

0 comments on commit 2470dc8

Please sign in to comment.