Home Explore Blog CI



neovim

8th chunk of `runtime/doc/if_pyth.txt`
a08477e2a3769310aa9dcb40e06fe05772e10f141d02f6ae0000000100000881
	unassignable, but you can change window
				options this way. Provides access only to
				window-local options, for buffer-local use
				|python-buffer| and for global ones use
				|python-options|. If option is |global-local|
				and local value is missing getting it will
				return None.
	number (read-only)	Window number.  The first window has number 1.
				This is zero in case it cannot be determined
				(e.g. when the window object belongs to other
				tab page).
	row, col (read-only)	On-screen window position in display cells.
				First position is zero.
	tabpage (read-only)	Window tab page.
	valid (read-write)	True or False. Window object becomes invalid
				when corresponding window is closed.

The height attribute is writable only if the screen is split horizontally.
The width attribute is writable only if the screen is split vertically.

Window object type is available using "Window" attribute of vim module.

==============================================================================
Tab page objects					*python-tabpage*

Tab page objects represent vim tab pages. You can obtain them in a number of
ways:
	- via vim.current.tabpage (|python-current|)
	- from indexing vim.tabpages (|python-tabpages|)

You can use this object to access tab page windows. They have no methods and
no sequence or other interfaces.

Tab page attributes are:
	number		The tab page number like the one returned by
			|tabpagenr()|.
	windows		Like |python-windows|, but for current tab page.
	vars		The tab page |t:| variables.
	window		Current tabpage window.
	valid		True or False. Tab page object becomes invalid when
			corresponding tab page is closed.

TabPage object type is available using "TabPage" attribute of vim module.

==============================================================================
pyeval() and py3eval() Vim functions			*python-pyeval*

To facilitate bi-directional interface, you can use |pyeval()| and |py3eval()|
functions to evaluate Python expressions and pass their values to Vim script.
|pyxeval()| is also available.

==============================================================================
Python 3						*python3*

As Python

Title: NVim Python Interface: Window and Tab Page Objects, pyeval() and Introduction to Python 3
Summary
This section details the remaining attributes of Window objects in the NVim Python interface, including number, row, col, tabpage and valid. It clarifies when height and width attributes can be written to. Then, it describes Tab Page objects, how to obtain them, and their attributes: number, windows, vars, window, and valid. It also mentions the availability of the 'TabPage' object type. Finally, it introduces the `pyeval()` and `py3eval()` functions for evaluating Python expressions within Vim script and briefly mentions Python 3 support.