summaryrefslogtreecommitdiffstats
path: root/indent/blade.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2016-07-05 09:53:49 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2016-07-05 09:53:49 +0200
commitbf188c4a51a6d151bb2694d73048727f4359c634 (patch)
tree3059e2f946ae6293e1809d67393fddced1197431 /indent/blade.vim
parenta5857b81c215139b3c0def78e5bd2f1da8a17af6 (diff)
downloadvim-polyglot-2.11.1.tar.gz
vim-polyglot-2.11.1.zip
Updatev2.11.1
Diffstat (limited to 'indent/blade.vim')
-rw-r--r--indent/blade.vim8
1 files changed, 2 insertions, 6 deletions
diff --git a/indent/blade.vim b/indent/blade.vim
index e5bf510c..d578a432 100644
--- a/indent/blade.vim
+++ b/indent/blade.vim
@@ -36,10 +36,11 @@ function! GetBladeIndent()
let line = substitute(substitute(getline(lnum), '\s\+$', '', ''), '^\s\+', '', '')
let cline = substitute(substitute(getline(v:lnum), '\s\+$', '', ''), '^\s\+', '', '')
let indent = indent(lnum)
- let cindent = indent(v:lnum)
if cline =~# '@\%(else\|elseif\|empty\|end\|show\|stop\)' ||
\ cline =~# '\%(<?.*\)\@<!?>\|\%({{.*\)\@<!}}\|\%({!!.*\)\@<!!!}'
let indent = indent - &sw
+ elseif line =~# '<?\%(.*?>\)\@!'
+ let indent = indent + &sw
else
if exists("*GetBladeIndentCustom")
let hindent = GetBladeIndentCustom()
@@ -56,17 +57,12 @@ function! GetBladeIndent()
endif
endif
let increase = indent + &sw
- if indent = indent(lnum)
- let indent = cindent <= indent ? -1 : increase
- endif
if line =~# '@\%(section\)\%(.*@end\)\@!' && line !~# '@\%(section\)\s*([^,]*)'
return indent
elseif line =~# '@\%(if\|elseif\|else\|unless\|foreach\|forelse\|for\|while\|empty\|push\|section\|can\|hasSection\)\%(.*@end\|.*@stop\)\@!' ||
\ line =~# '{{\%(.*}}\)\@!' || line =~# '{!!\%(.*!!}\)\@!'
return increase
- elseif line =~# '<?\%(.*?>\)\@!'
- return indent(lnum-1) == -1 ? increase : indent(lnum) + increase
else
return indent
endif