Skip to main content
Module

x/ddc_vim/deps.ts>fn.setbufvar

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.setbufvar
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { setbufvar } = fn;

Set option or local variable {varname} in buffer {expr} to {val}. This also works for a global or local window option, but it doesn't work for a global or local window variable. For a local window option the global value is unchanged. For the use of {expr}, see |bufname()| above. Note that the variable name without "b:" must be used. Examples: :call setbufvar(1, "&mod", 1) :call setbufvar("todo", "myvar", "foobar") This function is not available in the |sandbox|. Can also be used as a |method|, the base is passed as the third argument: GetValue()->setbufvar(buf, varname)

Parameters

denops: Denops
expr: unknown
varname: unknown
val: unknown

Returns

Promise<unknown>