Skip to content
Will Hopkins edited this page Jul 2, 2023 · 1 revision

Window

Tabpage objects contain window objects. The window object is simply a lua table with the following values:

Window = {
  number = integer,
  buffer = Buffer
}

Properties

number: integer

The window's internal id number, as reported by vim.api.nvim_get_current_win().

buffer: Buffer

The Buffer object representing the buffer that is shown in the window.

Methods

--- Closes the window
function Window:close()

--- Focuses the window
function Window:focus()

API Reference

Objects

Functions

cokeline.mappings

cokeline.utils

cokeline.hlgroups

cokeline.buffers

cokeline.tabs

cokeline.history

  • push(bufnr) Push an item into the history.
  • pop() Pop the last item off of the history.
  • list() Returns the history items as a (copied) list.
  • iter() Returns an iterator over the history items.
  • get(idx) Get the item at history index idx, if any.
  • last() Peek the last item in the history, without removing it.
  • contains(bufnr) Check if the history contains the given bufnr.
  • capacity() Returns the configured capacity.
  • len() Returns the number of items in the history.
Clone this wiki locally