If I run e.g. :var a = 1
from the command line I end up in E1124: "var" cannot be used in legacy vimscript. Running on MacVim 9.0.1276.
Is it normal behavior?
To use the vim9 script syntax your script must include as the first command vim9script
.
vim9script
var a = 1
On the command line to run vim9 script command you have to prefix them with :vim9
:vim9 g:a = 1
This is because the commandline runs :legacy
-mode by default unless :vim9cmd
is used.