Using vim9 script in cmd-line without vim9cmd

21 views
Skip to first unread message

Girish

unread,
May 15, 2024, 4:57:01 AMMay 15
to vim_use
Can this feature be added without major upheaval? Basically, I want to execute vim9 script without typing 'vim9cmd' in command line. Turn off legacy script in command line, and only use vim9 script. Today, we cannot even declare a vim9 variable in command line.

Ubaldo Tiberi

unread,
May 17, 2024, 5:50:33 AMMay 17
to vim_use
As also wrote on github, I second this. However:

1. vim9 variables are script-scoped. If you declare from the command line, e.g. `:var a = 0` what shall be the scope of `a`?
2. Having an option set vim9cmdline (false as default) to switch the command line interpreter between legacy and vim9 script looks a viable idea to me

My 2 cents,
/Ubaldo
Reply all
Reply to author
Forward
0 new messages