import { remove } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";
Without {end}: Remove the item at {idx} from List
{list} and
return the item.
With {end}: Remove items from {idx} to {end} (inclusive) and
return a List
with these items. When {idx} points to the same
item as {end} a list with one item is returned. When {end}
points to an item before {idx} this is an error.
See list-index
for possible values of {idx} and {end}.
Returns zero on error.
Example:
:echo "last item: " .. remove(mylist, -1)
:call remove(mylist, 0, 9)
Use delete()
to remove a file.
Can also be used as a method
:
mylist->remove(idx)