Skip to main content
Module

x/denops_std/function/mod.ts>settabwinvar

📚 Standard module for denops.vim
Go to Latest
function settabwinvar
import { settabwinvar } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

Set option or local variable {varname} in window {winnr} to {val}. Tabs are numbered starting with one. For the current tabpage use setwinvar(). {winnr} can be the window number or the window-ID. When {winnr} is zero the current window is used. Note that autocommands are blocked, side effects may not be triggered, e.g. when setting 'filetype' or 'syntax'. This also works for a global or local buffer option, but it doesn't work for a global or local buffer variable. For a local buffer option the global value is unchanged. Note that the variable name without "w:" must be used. Examples:

:call settabwinvar(1, 1, "&list", 0)
:call settabwinvar(3, 2, "myvar", "foobar")

This function is not available in the sandbox.

Can also be used as a method, the base is passed as the fourth argument:

GetValue()->settabwinvar(tab, winnr, name)

Parameters

denops: Denops
tabnr: unknown
winnr: unknown
varname: unknown
val: unknown

Returns

Promise<void>