From 0e68102487f0160f676c7f7bd62c71afe6e886a2 Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Wed, 4 Aug 2021 11:14:15 +0800 Subject: [PATCH] Improve multiple line tag syntax and custom tag indent --- indent/vue.vim | 7 ++++--- syntax/vue.vim | 10 +++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/indent/vue.vim b/indent/vue.vim index 3217ae2..04af881 100644 --- a/indent/vue.vim +++ b/indent/vue.vim @@ -86,8 +86,8 @@ function! s:GetIndentByContext(tag, syntax) let prevline = getline(s:PrevNonBlankNonComment(v:lnum)) let curline = getline(v:lnum) - if a:tag == 'view' - " Support 'view' tag from mini-program + if a:tag != 'template' && a:syntax == 'html' + " Set indent to 0 for custom tag with 'html' syntax if curline =~ s:block_tag && empty(prevline) let ind = 0 endif @@ -99,7 +99,8 @@ function! s:GetIndentByContext(tag, syntax) endif endif else - " When not in