Mercurial > vim
comparison runtime/indent/html.vim @ 14637:0ecb909e3249
Update runtime files.
commit https://github.com/vim/vim/commit/fc65cabb15d0236bce001ad78e12a40511caf941
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 28 22:58:02 2018 +0200
Update runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 28 Aug 2018 23:00:08 +0200 |
parents | 5923f64c8f5b |
children | 2b30a2b4bde2 |
comparison
equal
deleted
inserted
replaced
14636:91eef21ff090 | 14637:0ecb909e3249 |
---|---|
661 let extra = -shiftwidth() | 661 let extra = -shiftwidth() |
662 endif | 662 endif |
663 else | 663 else |
664 let cur_hasfield = curtext =~ '^\s*[a-zA-Z0-9-]\+:' | 664 let cur_hasfield = curtext =~ '^\s*[a-zA-Z0-9-]\+:' |
665 let prev_unfinished = s:CssUnfinished(prev_text) | 665 let prev_unfinished = s:CssUnfinished(prev_text) |
666 if !cur_hasfield && (prev_hasfield || prev_unfinished) | 666 if prev_unfinished |
667 " Continuation line has extra indent if the previous line was not a | 667 " Continuation line has extra indent if the previous line was not a |
668 " continuation line. | 668 " continuation line. |
669 let extra = shiftwidth() | 669 let extra = shiftwidth() |
670 " Align with @if | 670 " Align with @if |
671 if prev_text =~ '^\s*@if ' | 671 if prev_text =~ '^\s*@if ' |
714 | 714 |
715 return indent(align_lnum) + extra | 715 return indent(align_lnum) + extra |
716 endfunc "}}} | 716 endfunc "}}} |
717 | 717 |
718 " Inside <style>: Whether a line is unfinished. | 718 " Inside <style>: Whether a line is unfinished. |
719 " tag: | |
720 " tag: blah | |
721 " tag: blah && | |
722 " tag: blah || | |
719 func! s:CssUnfinished(text) | 723 func! s:CssUnfinished(text) |
720 "{{{ | 724 "{{{ |
721 return a:text =~ '\s\(||\|&&\|:\)\s*$' | 725 return a:text =~ '\(||\|&&\|:\|\k\)\s*$' |
722 endfunc "}}} | 726 endfunc "}}} |
723 | 727 |
724 " Search back for the first unfinished line above "lnum". | 728 " Search back for the first unfinished line above "lnum". |
725 func! s:CssFirstUnfinished(lnum, min_lnum) | 729 func! s:CssFirstUnfinished(lnum, min_lnum) |
726 "{{{ | 730 "{{{ |