diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-08-28 10:09:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-28 10:09:15 +0800 |
| commit | 2fbc82820b5168b0da4e918c192c05832dfd6211 (patch) | |
| tree | a29e02bb0c579ee76a0607340f534cd94540656e /runtime/syntax/python.vim | |
| parent | 7e2e3f8c255f7ae65bd9fdc3feba6b4efd21416f (diff) | |
| download | rneovim-2fbc82820b5168b0da4e918c192c05832dfd6211.tar.gz rneovim-2fbc82820b5168b0da4e918c192c05832dfd6211.tar.bz2 rneovim-2fbc82820b5168b0da4e918c192c05832dfd6211.zip | |
vim-patch:964a495: runtime(html): match plain tag and attribute names as keywords (#41522)
Problem: Several tag and attribute names are highlighted with regular
expression alternations even though they are plain words. A
:syn-match with an alternation is retried at nearly every
position of every tag.
Solution: Move the plain-word tag names (b, i, u, em, strong, head,
body, title, h1-h6) and the "label", "href" and "title"
attribute names into syn-keyword lists, leaving only the
genuinely hyphenated names "accept-charset" and "http-equiv"
as matches.
Profiling a 6000-line HTML file with :syntime, the converted rules drop
from a combined 0.044s to 0.004s, lowering total per-rule syntax time
by about 15%. Highlighting is unchanged except that a bare valueless
"href" attribute is now highlighted as an attribute, consistent with a
bare "title", which already behaved that way.
closes: vim/vim#21155
https://github.com/vim/vim/commit/964a495bef698368f4e200b1d22d63da27f47948
Co-authored-by: Julien Voisin <julien.voisin@dustri.org>
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions