diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2016-07-05 09:53:49 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2016-07-05 09:53:49 +0200 |
commit | bf188c4a51a6d151bb2694d73048727f4359c634 (patch) | |
tree | 3059e2f946ae6293e1809d67393fddced1197431 /indent/blade.vim | |
parent | a5857b81c215139b3c0def78e5bd2f1da8a17af6 (diff) | |
download | vim-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.vim | 8 |
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 |