aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/xml.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2021-12-26 11:03:25 +0100
committerGitHub <noreply@github.com>2021-12-26 11:03:25 +0100
commit8c720f6b9d3217e2a9449ce13aac02406edbbb4e (patch)
treed27747fd449d64e792e890eb729e2123701d40c6 /runtime/syntax/xml.vim
parent9dd8557921ec94035971a3145ab744add858459a (diff)
downloadrneovim-8c720f6b9d3217e2a9449ce13aac02406edbbb4e.tar.gz
rneovim-8c720f6b9d3217e2a9449ce13aac02406edbbb4e.tar.bz2
rneovim-8c720f6b9d3217e2a9449ce13aac02406edbbb4e.zip
vim-patch:partial fa3b72348d88 (#16780)
Update runtime files https://github.com/vim/vim/commit/fa3b72348d88343390fbe212cfc230fec1602fc2 omit doc/eval.txt (needs 8.2.3864) doc/map.txt (needs 8.2.3619) menu.vim (needs 8.2.0413)
Diffstat (limited to 'runtime/syntax/xml.vim')
-rw-r--r--runtime/syntax/xml.vim12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/syntax/xml.vim b/runtime/syntax/xml.vim
index 7c9791a7cc..d99f8b467a 100644
--- a/runtime/syntax/xml.vim
+++ b/runtime/syntax/xml.vim
@@ -10,6 +10,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
@@ -302,9 +303,12 @@ unlet b:current_syntax
" synchronizing
-" TODO !!! to be improved !!!
-syn sync match xmlSyncDT grouphere xmlDocType +\_.\(<!DOCTYPE\)\@=+
+syn sync match xmlSyncComment grouphere xmlComment +<!--+
+syn sync match xmlSyncComment groupthere NONE +-->+
+
+" The following is slow on large documents (and the doctype is optional
+" syn sync match xmlSyncDT grouphere xmlDocType +\_.\(<!DOCTYPE\)\@=+
" syn sync match xmlSyncDT groupthere NONE +]>+
if exists('g:xml_syntax_folding')
@@ -313,7 +317,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.
@@ -354,4 +358,4 @@ let b:current_syntax = "xml"
let &cpo = s:xml_cpo_save
unlet s:xml_cpo_save
-" vim: ts=8
+" vim: ts=4