From d5e282a85e1c5083c2c8a88ab6cc13d6738737a6 Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Thu, 15 Sep 2022 14:55:39 -0500 Subject: [PATCH] Merging part of Dec 24, 2021 upstream commit Improves syntax synchronization --- syntax/xml.vim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/syntax/xml.vim b/syntax/xml.vim index dc3db54..25544ac 100644 --- a/syntax/xml.vim +++ b/syntax/xml.vim @@ -11,6 +11,7 @@ " 20190923 - Fix xmlEndTag to match xmlTag (vim/vim#884) " 20190924 - Fix xmlAttribute property (amadeus/vim-xml@d8ce1c946) " 20191103 - Enable spell checking globally +" 20210428 - Improve syntax synchronizing " CONFIGURATION: " syntax folding can be turned on by @@ -308,9 +309,12 @@ unlet b:current_syntax " synchronizing -" TODO !!! to be improved !!! -syn sync match xmlSyncDT grouphere xmlDocType +\_.\(+ + +" The following is slow on large documents (and the doctype is optional +" syn sync match xmlSyncDT grouphere xmlDocType +\_.\(+ if exists('g:xml_syntax_folding') @@ -319,7 +323,7 @@ if exists('g:xml_syntax_folding') syn sync match xmlSync groupthere xmlRegion +"']\+>+ endif -syn sync minlines=100 +syn sync minlines=100 maxlines=200 " The default highlighting. @@ -361,4 +365,4 @@ let b:current_syntax = "xml" let &cpo = s:xml_cpo_save unlet s:xml_cpo_save -" vim: ts=8 +" vim: ts=4 -- 2.45.2