Home Explore Blog CI



neovim

54th chunk of `runtime/doc/vimfn.txt`
2868d99a3243bdfe85e2931f5c5fd548075a3c16da868a480000000100000fb3
 empty a
		dictionary with all window-local variables is returned.
		When {varname} is equal to "&" get the values of all
		window-local options in a |Dictionary|.
		Otherwise, when {varname} starts with "&" get the value of a
		window-local option.
		Note that {varname} must be the name without "w:".
		Tabs are numbered starting with one.  For the current tabpage
		use |getwinvar()|.
		{winnr} can be the window number or the |window-ID|.
		When {winnr} is zero the current window is used.
		This also works for a global option, buffer-local option and
		window-local option, but it doesn't work for a global variable
		or buffer-local variable.
		When the tab, window or variable doesn't exist {def} or an
		empty string is returned, there is no error message.
		Examples: >vim
			let list_is_on = gettabwinvar(1, 2, '&list')
			echo "myvar = " .. gettabwinvar(3, 1, 'myvar')
<
		To obtain all window-local variables use: >vim
			gettabwinvar({tabnr}, {winnr}, '&')
<

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

                Return: ~
                  (`any`)

gettagstack([{winnr}])                                           *gettagstack()*
		The result is a Dict, which is the tag stack of window {winnr}.
		{winnr} can be the window number or the |window-ID|.
		When {winnr} is not specified, the current window is used.
		When window {winnr} doesn't exist, an empty Dict is returned.

		The returned dictionary contains the following entries:
			curidx		Current index in the stack. When at
					top of the stack, set to (length + 1).
					Index of bottom of the stack is 1.
			items		List of items in the stack. Each item
					is a dictionary containing the
					entries described below.
			length		Number of entries in the stack.

		Each item in the stack is a dictionary with the following
		entries:
			bufnr		buffer number of the current jump
			from		cursor position before the tag jump.
					See |getpos()| for the format of the
					returned list.
			matchnr		current matching tag number. Used when
					multiple matching tags are found for a
					name.
			tagname		name of the tag

		See |tagstack| for more information about the tag stack.

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

                Return: ~
                  (`any`)

gettext({text})                                                      *gettext()*
		Translate String {text} if possible.
		This is mainly for use in the distributed Vim scripts.  When
		generating message translations the {text} is extracted by
		xgettext, the translator can add the translated message in the
		.po file and Vim will lookup the translation when gettext() is
		called.
		For {text} double quoted strings are preferred, because
		xgettext does not understand escaping in single quoted
		strings.

                Parameters: ~
                  • {text} (`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

Title: Documentation for `gettabwinvar()`, `gettagstack()`, `gettext()`, and `getwininfo()` Functions (Continued)
Summary
This section continues documenting Vim functions. It starts by finishing describing the `gettabwinvar()` function, explaining the use of {varname}, {tabnr}, {winnr} and {def} parameters. Following that, it details the `gettagstack()` function, which returns the tag stack of a window. It also documents the keys of the dictionary returned and how each stores relevant information regarding the tag stack. Then, it covers the `gettext()` function, which translates a string, primarily for use in distributed Vim scripts. Finally, it describes the `getwininfo()` function, returning information about windows, including their buffer number, dimensions, and associated tab page, as well as a reference to the dictionary with window-local variables.