runtime(help): Update syntax, match legacy header at :help vim9-mix

closes: #18458

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Doug Kearns
2025-09-30 20:12:55 +00:00
committed by Christian Brabandt
parent ef561cdcde
commit 21d40d2d41
6 changed files with 70 additions and 23 deletions

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Sep 27
" Last Change: 2025 Sep 29
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Quit when a (custom) syntax file was already loaded
@ -53,6 +53,15 @@ for [s:lang, s:syntax] in g:help_example_languages->items()
endfor
unlet! s:lang s:syntax
if has_key(g:help_example_languages, "vim9")
" for example at :help vim9-mix
syn region vim9LegacyHeader_HelpExample
\ start=+" legacy Vim script comments may go here+
\ end="^\ze\s*vim9s\%[cript]\>"
\ contains=@vimLegacyTop,vimComment,vimLineComment
syn cluster helpExampleHighlight_vim9 add=vim9LegacyHeader_HelpExample
endif
if has("ebcdic")
syn match helpHyperTextJump "\\\@<!|[^"*|]\+|" contains=helpBar
syn match helpHyperTextEntry "\*[^"*|]\+\*\s"he=e-1 contains=helpStar