From 2941c40e6ca6693645e75943528cdf403a00e8fd Mon Sep 17 00:00:00 2001 From: yemai Date: Mon, 17 Jun 2019 11:10:39 +0800 Subject: [PATCH] fix: replace xml/indent with html/indent to fix empty tag indent error --- indent/vue.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indent/vue.vim b/indent/vue.vim index c7054a8..f833ecc 100644 --- a/indent/vue.vim +++ b/indent/vue.vim @@ -55,7 +55,7 @@ runtime! indent/javascript.vim let b:javascript_indentexpr = &indentexpr unlet! b:did_indent -runtime! indent/xml.vim +runtime! indent/html.vim unlet! b:did_indent runtime! indent/css.vim @@ -103,7 +103,11 @@ function! GetVueIndent() let ind = GetPugIndent() elseif s:SynHTML(prevsyn) call LogMsg('syntax: html') - let ind = XmlIndentGet(v:lnum, 0) + if exists("*HtmlIndentGet") + let ind = HtmlIndentGet(v:lnum) + elseif exists("*HtmlIndent") + let ind = HtmlIndent() + endif " Align '/>' and '>' with '<' for multiline tags. if curline =~? s:end_tag