Mercurial > vim
comparison runtime/indent/html.vim @ 15131:bc1a8d21c811
Update runtime files.
commit https://github.com/vim/vim/commit/d47d52232bf21036c5c89081458be7eaf2630d24
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 9 20:43:55 2018 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 09 Dec 2018 20:45:05 +0100 |
parents | 2b30a2b4bde2 |
children | bd7461db24b3 |
comparison
equal
deleted
inserted
replaced
15130:4bd9c7284010 | 15131:bc1a8d21c811 |
---|---|
214 endfunc "}}} | 214 endfunc "}}} |
215 | 215 |
216 " Add known tag pairs. | 216 " Add known tag pairs. |
217 " Self-closing tags and tags that are sometimes {{{ | 217 " Self-closing tags and tags that are sometimes {{{ |
218 " self-closing (e.g., <p>) are not here (when encountering </p> we can find | 218 " self-closing (e.g., <p>) are not here (when encountering </p> we can find |
219 " the matching <p>, but not the other way around). Known self-closing tags: | 219 " the matching <p>, but not the other way around). |
220 " 'p', 'img', 'source'. | 220 " Known self-closing tags: " 'p', 'img', 'source', 'area', 'keygen', 'track', |
221 " 'wbr'. | |
221 " Old HTML tags: | 222 " Old HTML tags: |
222 call s:AddITags(s:indent_tags, [ | 223 call s:AddITags(s:indent_tags, [ |
223 \ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', | 224 \ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', |
224 \ 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code', | 225 \ 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code', |
225 \ 'colgroup', 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font', | 226 \ 'colgroup', 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font', |
230 \ 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td', | 231 \ 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td', |
231 \ 'tr', 'tbody', 'tfoot', 'thead']) | 232 \ 'tr', 'tbody', 'tfoot', 'thead']) |
232 | 233 |
233 " New HTML5 elements: | 234 " New HTML5 elements: |
234 call s:AddITags(s:indent_tags, [ | 235 call s:AddITags(s:indent_tags, [ |
235 \ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas', | 236 \ 'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'data', |
236 \ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption', | 237 \ 'datalist', 'details', 'dialog', 'embed', 'figcaption', 'figure', |
237 \ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter', | 238 \ 'footer', 'header', 'hgroup', 'main', 'mark', 'meter', 'nav', 'output', |
238 \ 'nav', 'output', 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', | 239 \ 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'summary', |
239 \ 'summary', 'svg', 'time', 'track', 'video', 'wbr']) | 240 \ 'svg', 'time', 'video']) |
240 | 241 |
241 " Tags added for web components: | 242 " Tags added for web components: |
242 call s:AddITags(s:indent_tags, [ | 243 call s:AddITags(s:indent_tags, [ |
243 \ 'content', 'shadow', 'template']) | 244 \ 'content', 'shadow', 'template']) |
244 "}}} | 245 "}}} |
932 if idx == -1 | 933 if idx == -1 |
933 " try <tag attr | 934 " try <tag attr |
934 let idx = match(text, '<' . s:tagname . '\s\+\zs\w') | 935 let idx = match(text, '<' . s:tagname . '\s\+\zs\w') |
935 endif | 936 endif |
936 if idx == -1 | 937 if idx == -1 |
937 " after just <tag indent one level more | 938 " after just "<tag" indent one level more |
938 let idx = match(text, '<' . s:tagname . '$') | 939 let idx = match(text, '<' . s:tagname . '$') |
939 if idx >= 0 | 940 if idx >= 0 |
940 call cursor(lnum, idx) | 941 call cursor(lnum, idx) |
941 return virtcol('.') + shiftwidth() | 942 return virtcol('.') + shiftwidth() |
942 endif | 943 endif |