Home Explore Blog CI



neovim

55th chunk of `runtime/doc/vimfn.txt`
16175df5d96dc95cf33edc9d89f2d98cfdd6ffd84eacdaa60000000100000fab
 (`string`)

                Return: ~
                  (`string`)

getwininfo([{winid}])                                             *getwininfo()*
		Returns information about windows as a |List| with Dictionaries.

		If {winid} is given Information about the window with that ID
		is returned, as a |List| with one item.  If the window does not
		exist the result is an empty list.

		Without {winid} information about all the windows in all the
		tab pages is returned.

		Each List item is a |Dictionary| with the following entries:
			botline		last complete displayed buffer line
			bufnr		number of buffer in the window
			height		window height (excluding winbar)
			leftcol		first column displayed; only used when
					'wrap' is off
			loclist		1 if showing a location list
			quickfix	1 if quickfix or location list window
			terminal	1 if a terminal window
			tabnr		tab page number
			topline		first displayed buffer line
			variables	a reference to the dictionary with
					window-local variables
			width		window width
			winbar		1 if the window has a toolbar, 0
					otherwise
			wincol		leftmost screen column of the window;
					"col" from |win_screenpos()|
			textoff		number of columns occupied by any
					'foldcolumn', 'signcolumn' and line
					number in front of the text
			winid		|window-ID|
			winnr		window number
			winrow		topmost screen line of the window;
					"row" from |win_screenpos()|

                Parameters: ~
                  • {winid} (`integer?`)

                Return: ~
                  (`vim.fn.getwininfo.ret.item[]`)

getwinpos([{timeout}])                                             *getwinpos()*
		The result is a |List| with two numbers, the result of
		|getwinposx()| and |getwinposy()| combined:
			[x-pos, y-pos]
		{timeout} can be used to specify how long to wait in msec for
		a response from the terminal.  When omitted 100 msec is used.

		Use a longer time for a remote terminal.
		When using a value less than 10 and no response is received
		within that time, a previously reported position is returned,
		if available.  This can be used to poll for the position and
		do some work in the meantime: >vim
			while 1
			  let res = getwinpos(1)
			  if res[0] >= 0
			    break
			  endif
			  " Do some work here
			endwhile
<

                Parameters: ~
                  • {timeout} (`integer?`)

                Return: ~
                  (`any`)

getwinposx()                                                      *getwinposx()*
		The result is a Number, which is the X coordinate in pixels of
		the left hand side of the GUI Vim window.  The result will be
		-1 if the information is not available.
		The value can be used with `:winpos`.

                Return: ~
                  (`integer`)

getwinposy()                                                      *getwinposy()*
		The result is a Number, which is the Y coordinate in pixels of
		the top of the GUI Vim window.  The result will be -1 if the
		information is not available.
		The value can be used with `:winpos`.

                Return: ~
                  (`integer`)

getwinvar({winnr}, {varname} [, {def}])                            *getwinvar()*
		Like |gettabwinvar()| for the current tabpage.
		Examples: >vim
			let list_is_on = getwinvar(2, '&list')
			echo "myvar = " .. getwinvar(1, 'myvar')

                Parameters: ~
                  • {winnr} (`integer`)
                  • {varname} (`string`)
                  • {def} (`any?`)

                Return: ~
                  (`any`)

glob({expr} [, {nosuf} [, {list} [, {alllinks}]]])                      *glob()*
		Expand the file wildcards in {expr}.  See |wildcards| for the
		use of special characters.

		Unless the optional {nosuf} argument is given and is |TRUE|,
		the 'suffixes' and 'wildignore' options apply: Names matching
		one of the patterns in 'wildignore' will be skipped and
		'suffixes' affect the ordering of matches.
		'wildignorecase' always applies.

		When {list} is

Title: Documentation for `getwininfo()`, `getwinpos()`, `getwinposx()`, `getwinposy()`, `getwinvar()`, and `glob()` Functions
Summary
This section documents several Vim functions. It begins by completing the documentation for `getwininfo()`, detailing additional keys in the returned dictionary such as `width`, `winbar`, `wincol`, `textoff`, `winid`, `winnr`, and `winrow`. It then explains the `getwinpos()` function, which returns the X and Y coordinates of the GUI Vim window. Then, it details the `getwinposx()` and `getwinposy()` functions which can be used to obtain the x and y position of the window respectively. Following that, it describes the `getwinvar()` function, similar to `gettabwinvar()` but for the current tabpage. Finally, it introduces the `glob()` function, which expands file wildcards in a given expression.