diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-24 15:09:13 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-24 15:09:13 +0100 |
commit | 63b74a8362b14576b21d342dc424d0396ca8ea27 (patch) | |
tree | ef1a162503974f7209058ad2430484c892409344 /runtime/indent/html.vim | |
parent | db77b84ac2b6373ae4200d47945fc6ca64337e31 (diff) |
Update runtime files.
Diffstat (limited to 'runtime/indent/html.vim')
-rw-r--r-- | runtime/indent/html.vim | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index 1a8177050a..1d2043ae9e 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -2,7 +2,7 @@ " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula <anwoku@yahoo.de> -" Last Change: 2018 Mar 28 +" Last Change: 2019 Mar 20 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -902,12 +902,19 @@ func! s:InsideTag(foundHtmlString) "{{{ if a:foundHtmlString " Inside an attribute string. - " Align with the previous line or use an external function. + " Align with the opening quote or use an external function. let lnum = v:lnum - 1 if lnum > 1 if exists('b:html_indent_tag_string_func') return b:html_indent_tag_string_func(lnum) endif + " If there is a double quote in the previous line, indent with the + " character after it. + if getline(lnum) =~ '"' + call cursor(lnum, 0) + normal f" + return virtcol('.') + endif return indent(lnum) endif endif |