Skip to main content
Module

x/dpp_vim/deps.ts>fn.add

Dark powered plugin manager for Vim/neovim
Latest
function fn.add
import { fn } from "https://deno.land/x/dpp_vim@v0.2.0/deps.ts";
const { add } = fn;

Append the item {expr} to List or Blob {object}. Returns the resulting List or Blob. Examples:

:let alist = add([1, 2, 3], item)
:call add(mylist, "woodstock")

Note that when {expr} is a List it is appended as a single item. Use extend() to concatenate Lists. When {object} is a Blob then {expr} must be a number. Use insert() to add an item at another position. Returns 1 if {object} is not a List or a Blob.

Can also be used as a method:

mylist->add(val1)->add(val2)

Parameters

denops: Denops
object: unknown
expr: unknown

Returns

Promise<unknown[] | unknown>