Skip to main content
Module

x/denops_std/function/mod.ts>remove

📚 Standard module for denops.vim
Go to Latest
function remove
import { remove } from "https://deno.land/x/denops_std@v4.1.3/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)

Parameters

denops: Denops
list: unknown
idx: unknown
optional
end: unknown

Returns

Promise<unknown>