On Wed, Feb 19, 2020 at 5:46 PM Bram Moolenaar <
Br...@moolenaar.net> wrote:
>
>
> Tony wrote:
>
> > I suggest adding feature 'vim9' testable by has()
> >
> > This is for consistency, it is not absolutely necessary since ":if
> > exists(':vim9script') == 2" should give the same result.
> >
> > I suppose the following is an oversight: In my current 8.2.279 builds,
> > exists(':vim9script') returns 2 in the Huge build and 0 in the Big
> > build, which might be expected.
>
> I also get 2 in the big build.
Today, in 8.2.284, so do I. Maybe previously I mistyped?
In the Small buid, exists() gives me 0 for ":vim9" with or without
"script" postfixed to it, 2 for :import, :export, :def, etc., 1 for
:disa, :endd, etc. In the Small and Tiny builds (which are compiled
without +eval) of course there is no exists() function.
Apparently Vim9 scripts themselves are a more restricted feature than
the individual Vim9 commands. I wonder though, how :import could be
used in a Vim executable not supporting full-fledged Vim9 scripts, as
seems to be the case in the Normal build. Or could it refer to :export
statements in a script not headed by a :vim9 line? The help explicitly
mentions the use of :import in legacy scripts (at the very end of the
help for :import, on the easily overlooked vim9.txt lines 445sqq) but
it is not clear (AFAICT) that the import-from script might be a
non-Vim9 script.
Best regards,
Tony.