From 2fe95cb1adfa00e67ac8bd51197f003312b99132 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 9 Sep 2021 18:59:11 +0200 Subject: vim-patch:partial 2346a6378483 (#15599) Update runtime files https://github.com/vim/vim/commit/2346a6378483c9871016f9fc821ec5cbea638f13 omit doc/vim.man omit doc/vim9.txt omit doc/vimdiff.txt omit doc/vimdiff.man skip doc/eval.txt (missing patch 8.2.2324) skip doc/help.txt (missing patch 8.2.2344) --- runtime/indent/html.vim | 63 ++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 29 deletions(-) (limited to 'runtime/indent') diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index 7019bd4a82..d4b91f6421 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -1,7 +1,7 @@ " Vim indent script for HTML " Maintainer: Bram Moolenaar " Original Author: Andy Wokula -" Last Change: 2021 Jan 26 +" Last Change: 2021 Jun 13 " Version: 1.0 "{{{ " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -62,7 +62,7 @@ let s:tagname = '\w\+\(-\w\+\)*' " Prefer using buffer-local settings over global settings, so that there can " be defaults for all HTML files and exceptions for specific types of HTML " files. -func! HtmlIndent_CheckUserSettings() +func HtmlIndent_CheckUserSettings() "{{{ let inctags = '' if exists("b:html_indent_inctags") @@ -178,7 +178,7 @@ let s:endtags = [0,0,0,0,0,0,0] " long enough for the highest index "}}} " Add a list of tag names for a pair of to "tags". -func! s:AddITags(tags, taglist) +func s:AddITags(tags, taglist) "{{{ for itag in a:taglist let a:tags[itag] = 1 @@ -187,7 +187,7 @@ func! s:AddITags(tags, taglist) endfunc "}}} " Take a list of tag name pairs that are not to be used as tag pairs. -func! s:RemoveITags(tags, taglist) +func s:RemoveITags(tags, taglist) "{{{ for itag in a:taglist let a:tags[itag] = 1 @@ -196,7 +196,7 @@ func! s:RemoveITags(tags, taglist) endfunc "}}} " Add a block tag, that is a tag with a different kind of indenting. -func! s:AddBlockTag(tag, id, ...) +func s:AddBlockTag(tag, id, ...) "{{{ if !(a:id >= 2 && a:id < len(s:endtags)) echoerr 'AddBlockTag ' . a:id @@ -255,7 +255,7 @@ call s:AddBlockTag('') " Return non-zero when "tagname" is an opening tag, not being a block tag, for " which there should be a closing tag. Can be used by scripts that include " HTML indenting. -func! HtmlIndent_IsOpenTag(tagname) +func HtmlIndent_IsOpenTag(tagname) "{{{ if get(s:indent_tags, a:tagname) == 1 return 1 @@ -264,7 +264,7 @@ func! HtmlIndent_IsOpenTag(tagname) endfunc "}}} " Get the value for "tagname", taking care of buffer-local tags. -func! s:get_tag(tagname) +func s:get_tag(tagname) "{{{ let i = get(s:indent_tags, a:tagname) if (i == 1 || i == -1) && get(b:hi_removed_tags, a:tagname) != 0 @@ -277,7 +277,7 @@ func! s:get_tag(tagname) endfunc "}}} " Count the number of start and end tags in "text". -func! s:CountITags(text) +func s:CountITags(text) "{{{ " Store the result in s:curind and s:nextrel. let s:curind = 0 " relative indent steps for current line [unit &sw]: @@ -289,7 +289,7 @@ func! s:CountITags(text) endfunc "}}} " Count the number of start and end tags in text. -func! s:CountTagsAndState(text) +func s:CountTagsAndState(text) "{{{ " Store the result in s:curind and s:nextrel. Update b:hi_newstate.block. let s:curind = 0 " relative indent steps for current line [unit &sw]: @@ -304,7 +304,7 @@ func! s:CountTagsAndState(text) endfunc "}}} " Used by s:CountITags() and s:CountTagsAndState(). -func! s:CheckTag(itag) +func s:CheckTag(itag) "{{{ " Returns an empty string or "SCRIPT". " a:itag can be "tag" or "/tag" or "" @@ -338,7 +338,7 @@ func! s:CheckTag(itag) endfunc "}}} " Used by s:CheckTag(). Returns an empty string or "SCRIPT". -func! s:CheckBlockTag(blocktag, ind) +func s:CheckBlockTag(blocktag, ind) "{{{ if a:ind > 0 " a block starts here @@ -366,7 +366,7 @@ func! s:CheckBlockTag(blocktag, ind) endfunc "}}} " Used by s:CheckTag(). -func! s:CheckCustomTag(ctag) +func s:CheckCustomTag(ctag) "{{{ " Returns 1 if ctag is the tag for a custom element, 0 otherwise. " a:ctag can be "tag" or "/tag" or "" @@ -396,7 +396,7 @@ func! s:CheckCustomTag(ctag) endfunc "}}} " Return the