> How in vim9script a range should be processed by a def function?
>
> Vim9.txt states that def functions do not support range option.
>
> So given a range what def function would/should do? Run it for every line
> in range?
Normally the function will be called for each line in the range.
> How do I get smth similar to a:firstline and a:lastline?
You can pass a range as an argument. Or use marks.
Thus you can't do "1,10call Func()" and have the function called once
for the range. You can define a user command that takes the range and
passes it to the function.
You could also use a legacy function with the range option that calls
the :def function with a:firstline and a:lastine.
--
Facepalm statement #4: "3000 year old graves? That's not possible, it's only
2014!"
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///