diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2022-01-31 18:09:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-31 18:09:51 +0100 |
| commit | bddce4b0ff0eb7ac1f652eea6fce81b3e2cc5044 (patch) | |
| tree | 22ca9a4d8b86b84d4a1a273d2b251f10057b347d /runtime/indent/html.vim | |
| parent | 79b92da0d289d1adcd0bb27c7ee5786be460c166 (diff) | |
| download | rneovim-bddce4b0ff0eb7ac1f652eea6fce81b3e2cc5044.tar.gz rneovim-bddce4b0ff0eb7ac1f652eea6fce81b3e2cc5044.tar.bz2 rneovim-bddce4b0ff0eb7ac1f652eea6fce81b3e2cc5044.zip | |
vim-patch:c4573eb12dba (#17258)
Update runtime files
https://github.com/vim/vim/commit/c4573eb12dba6a062af28ee0b8938d1521934ce4
Diffstat (limited to 'runtime/indent/html.vim')
| -rw-r--r-- | runtime/indent/html.vim | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index d4b91f6421..a3c32d6342 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 <anwoku@yahoo.de> -" Last Change: 2021 Jun 13 +" Last Change: 2022 Jan 31 " Version: 1.0 "{{{ " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -149,6 +149,15 @@ func HtmlIndent_CheckUserSettings() let b:html_indent_line_limit = 200 endif endif + + if exists('b:html_indent_attribute') + let b:hi_attr_indent = b:html_indent_attribute + elseif exists('g:html_indent_attribute') + let b:hi_attr_indent = g:html_indent_attribute + else + let b:hi_attr_indent = 2 + endif + endfunc "}}} " Init Script Vars @@ -946,11 +955,11 @@ func s:InsideTag(foundHtmlString) let idx = match(text, '<' . s:tagname . '\s\+\zs\w') endif if idx == -1 - " after just "<tag" indent two levels more + " after just "<tag" indent two levels more by default let idx = match(text, '<' . s:tagname . '$') if idx >= 0 call cursor(lnum, idx + 1) - return virtcol('.') - 1 + shiftwidth() * 2 + return virtcol('.') - 1 + shiftwidth() * b:hi_attr_indent endif endif if idx > 0 |