From a55c8533851805477250a78888546f1908adabaf Mon Sep 17 00:00:00 2001 From: Tomato Ketchup Date: Fri, 9 Dec 2016 17:40:08 +0900 Subject: [PATCH] Fix indentation broken when using a action with a minus sign like `{{-' --- indent/gohtmltmpl.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indent/gohtmltmpl.vim b/indent/gohtmltmpl.vim index d95cbc2463..864913df44 100644 --- a/indent/gohtmltmpl.vim +++ b/indent/gohtmltmpl.vim @@ -30,13 +30,13 @@ function! GetGoHTMLTmplIndent(lnum) " If need to indent based on last line let last_line = getline(a:lnum-1) - if last_line =~ '^\s*{{\s*\%(if\|else\|range\|with\|define\|block\).*}}' + if last_line =~ '^\s*{{-\=\s*\%(if\|else\|range\|with\|define\|block\).*}}' let ind += sw endif " End of FuncMap block let current_line = getline(a:lnum) - if current_line =~ '^\s*{{\s*\%(else\|end\).*}}' + if current_line =~ '^\s*{{-\=\s*\%(else\|end\).*}}' let ind -= sw endif