Re: def! in legacy vimscript

2022-02-18 Fir de Conversatie Ben Jackson
OK, makes sense, thanks. > On 18 Feb 2022, at 11:29, Bram Moolenaar wrote: > > >>> Wether a function is script-local or global (when not using a "s:" or >>> "g:" prefix) depends on the script it's defined in The rule is "at the >>> script level, the type of script defines what the scope of the

Re: def! in legacy vimscript

2022-02-18 Fir de Conversatie Bram Moolenaar
> > Wether a function is script-local or global (when not using a "s:" or > > "g:" prefix) depends on the script it's defined in The rule is "at the > > script level, the type of script defines what the scope of the items > > is". I think that's easy to understand. > > You know, I think the oth

Re: def! in legacy vimscript

2022-02-18 Fir de Conversatie puremo...@gmail.com
> Wether a function is script-local or global (when not using a "s:" or "g:" prefix) depends on the script it's defined in > The rule is "at the script level, the type of script defines what the scope of the items is". I think that's easy to understand. You know, I think the other rule is argu

Re: def! in legacy vimscript

2022-02-17 Fir de Conversatie Bram Moolenaar
Maxim Kim wrote: > Shouldn't def functions be prohibited in legacy vimscript? > > https://vi.stackexchange.com/questions/36829/how-can-i-define-vim9-functions-and-vim9-lambdas-in-a-vim9-script > > Basically if you add > > def! Hello() > echo "hello world" > enddef > > to a regular legacy

def! in legacy vimscript

2022-02-16 Fir de Conversatie Maxim Kim
Shouldn't def functions be prohibited in legacy vimscript? https://vi.stackexchange.com/questions/36829/how-can-i-define-vim9-functions-and-vim9-lambdas-in-a-vim9-script Basically if you add def! Hello() echo "hello world" enddef to a regular legacy vim file (.vimrc, for example), function