Skip to main content
Module

x/ddc_vim/deps.ts>fn.winwidth

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

The result is a Number, which is the width of window {nr}. {nr} can be the window number or the |window-ID|. When {nr} is zero, the width of the current window is returned. When window {nr} doesn't exist, -1 is returned. An existing window always has a width of zero or more. Examples: :echo "The current window has " . winwidth(0) . " columns." :if winwidth(0) <= 50 : 50 wincmd | :endif For getting the terminal or screen size, see the 'columns' option. Can also be used as a |method|: GetWinid()->winwidth()

Parameters

denops: Denops
nr: unknown

Returns

Promise<unknown>