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,4 +1,4 @@
*vim9.txt* For Vim version 9.1. Last change: 2025 Aug 27
*vim9.txt* For Vim version 9.1. Last change: 2025 Sep 30
VIM REFERENCE MANUAL by Bram Moolenaar
@ -2083,14 +2083,16 @@ original value to get the same effect. The order of flags may change.
In the |vimrc| file sourced on startup this does not happen.
*vim9-mix*
There is one way to use both legacy and Vim9 syntax in one script file: >
" comments may go here
There is one way to use both legacy and Vim9 syntax in one script file: >vim9
" legacy Vim script comments may go here
if !has('vim9script')
" legacy script commands go here
" legacy Vim script commands go here
finish
endif
vim9script
# Vim9 script commands go here
This allows for writing a script that takes advantage of the Vim9 script
syntax if possible, but will also work on a Vim version without it.