Skip to main content
Module

x/denops_std/function/mod.ts>winlayout

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

The result is a nested List containing the layout of windows in a tabpage. Without {tabnr} use the current tabpage, otherwise the tabpage with number {tabnr}. If the tabpage {tabnr} is not found, returns an empty list. For a leaf window, it returns: ['leaf', {winid}] For horizontally split windows, which form a column, it returns: ['col', [{nested list of windows}]] For vertically split windows, which form a row, it returns: ['row', [{nested list of windows}]] Example: " Only one window in the tab page :echo winlayout() ['leaf', 1000] " Two horizontally split windows :echo winlayout() ['col', [['leaf', 1000], ['leaf', 1001]]] " The second tab page, with three horizontally split " windows, with two vertically split windows in the " middle window :echo winlayout(2) ['col', [['leaf', 1002], ['row', [['leaf', 1003], ['leaf', 1001]]], ['leaf', 1000]]] Can also be used as a |method|: GetTabnr()->winlayout()

Parameters

denops: Denops
optional
tabnr: unknown

Returns

Promise<unknown>