From b617e1e1106c28ed312db8545c199f2e7efa7f81 Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Wed, 31 Mar 2021 18:37:28 +0800 Subject: [PATCH] Fix indent for blocks in template --- indent/vue.vim | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/indent/vue.vim b/indent/vue.vim index 64d3dcb..04dfbca 100644 --- a/indent/vue.vim +++ b/indent/vue.vim @@ -78,20 +78,23 @@ function! s:GetBlockIndent(syntax) return ind endfunction -function! s:GetIndentByContext(syntax) +function! s:GetIndentByContext(tag, syntax) let ind = -1 let prevline = getline(s:PrevNonBlankNonComment(v:lnum)) let curline = getline(v:lnum) - " 0 for blocks except template as it can be nested - if curline =~ s:block_tag && - \ (curline !~ s:template_tag || a:syntax == 'pug') + " When not in