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