diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-11-22 22:01:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-22 22:01:15 -0500 |
commit | cd691f2b6f605bc7fc13961e275823673d9871ad (patch) | |
tree | ab668aeb52dadeb4ad63c1b404ccf44159dc6ebc /runtime/indent/xml.vim | |
parent | ee8f530b400881f1de3e8004f614552d7ef4c3d4 (diff) | |
parent | 2d35706b97311f5a3928f18941236a0058fd3410 (diff) | |
download | rneovim-cd691f2b6f605bc7fc13961e275823673d9871ad.tar.gz rneovim-cd691f2b6f605bc7fc13961e275823673d9871ad.tar.bz2 rneovim-cd691f2b6f605bc7fc13961e275823673d9871ad.zip |
Merge pull request #13333 from adrian5/filetype-xml
runtime: Patch xml, xmllint, xmlformat filetypes
Diffstat (limited to 'runtime/indent/xml.vim')
-rw-r--r-- | runtime/indent/xml.vim | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim index 883af98563..413a3ddb53 100644 --- a/runtime/indent/xml.vim +++ b/runtime/indent/xml.vim @@ -1,9 +1,10 @@ -" Language: xml -" Repository: https://github.com/chrisbra/vim-xml-ftplugin -" Last Changed: July 27, 2019 -" Maintainer: Christian Brabandt <cb@256bit.org> -" Previous Maintainer: Johannes Zellner <johannes@zellner.org> +" Language: XML +" Maintainer: Christian Brabandt <cb@256bit.org> +" Repository: https://github.com/chrisbra/vim-xml-ftplugin +" Previous Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Changed: 2019 Dec 02 " Last Change: +" 20191202 - Handle docbk filetype " 20190726 - Correctly handle non-tagged data " 20190204 - correctly handle wrap tags " https://github.com/chrisbra/vim-xml-ftplugin/issues/5 @@ -134,7 +135,7 @@ fun! XmlIndentGet(lnum, use_syntax_check) if syn_name_end =~ 'Comment' && syn_name_start =~ 'Comment' return <SID>XmlIndentComment(a:lnum) - elseif empty(syn_name_start) && empty(syn_name_end) + elseif empty(syn_name_start) && empty(syn_name_end) && a:use_syntax_check " non-xml tag content: use indent from 'autoindent' return pind + shiftwidth() endif @@ -148,7 +149,7 @@ endfun func! <SID>IsXMLContinuation(line) " Checks, whether or not the line matches a start-of-tag - return a:line !~ '^\s*<' + return a:line !~ '^\s*<' && &ft is# 'xml' endfunc func! <SID>HasNoTagEnd(line) |