Re: passing vim9 vars to python3

2023-05-31 Thread Bram Moolenaar
>- From vim9 help I see *Functions and variables are script-local by >default* > > So s: is no mandatory no?, because if I put s: I see E1268: > Cannot use s: in Vim9 script: s:yml_f = yml_fpath. You need to declare the variable at the script level first. You cannot

Re: passing vim9 vars to python3

2023-05-31 Thread N i c o l a s
- From vim9 help I see *Functions and variables are script-local by default* So s: is no mandatory no?, because if I put s: I see E1268: Cannot use s: in Vim9 script: s:yml_f = yml_fpath. - So I delete s: and obtain this 3.12.0b1 (tags/v3.12.0b1:5612078,

Re: passing vim9 vars to python3

2023-05-31 Thread Bram Moolenaar
> Thank you I knew, this is working > > vim9script > > def g:Py3_SimpleMinimalTest(yml_fpath: string): void > w:yml_f = yml_fpath > exe 'py3 print(sys.version)' > exe 'py3 print(vim.current.window.vars[''yml_f''])' > enddef > > and what about making this works > > def

Re: passing vim9 vars to python3

2023-05-31 Thread N i c o l a s
Hi Bram, Thank you I knew, this is working vim9script def g:Py3_SimpleMinimalTest(yml_fpath: string): void w:yml_f = yml_fpath exe 'py3 print(sys.version)' exe 'py3 print(vim.current.window.vars[''yml_f''])' enddef and what about making this works def g:Py3_SimpleMinimalTest(yml_fpath:

Re: passing vim9 vars to python3

2023-05-31 Thread Bram Moolenaar
> Seeing the legacy vimscript func* Test_python3_vars()* in > *src\testdir\test_python3.vim*, > > Can you confirm that in vim9script, those setlines test are no possible to > be written in same way to be passed to python3 world ? > > func Test_python3_vars() > let g:foo = 'bac'

passing vim9 vars to python3

2023-05-31 Thread N i c o l a s
Hi, Seeing the legacy vimscript func* Test_python3_vars()* in *src\testdir\test_python3.vim*, Can you confirm that in vim9script, those setlines test are no possible to be written in same way to be passed to python3 world ? func Test_python3_vars() let g:foo = 'bac' -- << --