Re: Merging Vim9 script changes

2020-01-26 Fir de Conversatie Tony Mechelynck
On Sun, Jan 26, 2020 at 6:57 PM Bram Moolenaar wrote: > > > Tony wrote: > > > IIUC, the following is now a valid construct in newly-written or > > updated non-"vim9script" script? (Let's say, a .vimrc which must also > > support an older Vim version from my Linux distro) > > > > if exists('vim9scr

Re: Merging Vim9 script changes

2020-01-26 Fir de Conversatie Bram Moolenaar
Tony wrote: > IIUC, the following is now a valid construct in newly-written or > updated non-"vim9script" script? (Let's say, a .vimrc which must also > support an older Vim version from my Linux distro) > > if exists('vim9script') == 2 That should be: if exists(':vim9script') == 2 >

Re: Merging Vim9 script changes

2020-01-26 Fir de Conversatie Tony Mechelynck
On Sun, Jan 26, 2020 at 6:18 PM Tony Mechelynck wrote: > > IIUC, the following is now a valid construct in newly-written or > updated non-"vim9script" script? (Let's say, a .vimrc which must also > support an older Vim version from my Linux distro) > > if exists('vim9script') == 2 oops: if exists

Re: Merging Vim9 script changes

2020-01-26 Fir de Conversatie Tony Mechelynck
IIUC, the following is now a valid construct in newly-written or updated non-"vim9script" script? (Let's say, a .vimrc which must also support an older Vim version from my Linux distro) if exists('vim9script') == 2 import MyFunc as myfunc from '~/.vim/myvim9.vim' else function s:my

Re: Merging Vim9 script changes

2020-01-26 Fir de Conversatie Bram Moolenaar
Paul Jolly wrote: > > > * if Vim9 script remains experimental, presumably I have to explicitly > > > enable it within a script it somehow/somewhere? Or is this the > > > vim9script reference above? > > > > The Vim9 script syntax is only used for functions defined with ":def" > > and for scripts

Re: Merging Vim9 script changes

2020-01-25 Fir de Conversatie Paul Jolly
Thanks very much. > > * if Vim9 script remains experimental, presumably I have to explicitly > > enable it within a script it somehow/somewhere? Or is this the > > vim9script reference above? > > The Vim9 script syntax is only used for functions defined with ":def" > and for scripts that start wit

Re: Merging Vim9 script changes

2020-01-25 Fir de Conversatie Bram Moolenaar
Paul Jolly wrote: > A couple of stupid questions: > > * if Vim9 script remains experimental, presumably I have to explicitly > enable it within a script it somehow/somewhere? Or is this the > vim9script reference above? The Vim9 script syntax is only used for functions defined with ":def" and

Re: Merging Vim9 script changes

2020-01-25 Fir de Conversatie Paul Jolly
Hi Bram - interested to try things out. A couple of stupid questions: * if Vim9 script remains experimental, presumably I have to explicitly enable it within a script it somehow/somewhere? Or is this the vim9script reference above? * you allude to this point above, but will the speed improvements

Merging Vim9 script changes

2020-01-25 Fir de Conversatie Bram Moolenaar
I have been experimenting with ideas for Vim9 script in a separate repository for a while. I'm quite happy with how this turns out, and I haven't heard objections. Since keeping this separate from the main Vim code requires extra maintenance, especially when refactoring code, I think it's time