diff --git a/plugin/detectindent.vim b/plugin/detectindent.vim index 4801de1..9b3605b 100644 --- a/plugin/detectindent.vim +++ b/plugin/detectindent.vim @@ -32,13 +32,17 @@ fun! HasCStyleComments() return index(["c", "cpp", "java", "javascript", "php"], &ft) != -1 endfun +fun! HasHTMLStyleComments() + return index(["html", "xml"], &ft) != -1 +endfun + fun! IsCommentStart(line) " &comments aren't reliable - return HasCStyleComments() && a:line =~ '/\*' + return (HasCStyleComments() && a:line =~ '/\*') || (HasHTMLStyleComments() && a:line =~ '') endfun fun! IsCommentLine(line)