import { fn } from "https://deno.land/x/ddc_vim@v3.8.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