Hi all,
I have created the following new functions to return information
about buffers, windows and tabpages.
Pull request: https://github.com/vim/vim/pull/833
1. Function: getbufinfo([{expr}])
Returns information about all the buffers as a List of dictionaries.
If {expr} is supplied, then the information about the buffer
specified by {expr} is returned as a Dict. If {expr} is not supplied,
then information about all the buffers is returned.
Each returned list item is a dictionary with the following entries:
changed TRUE if the buffer is modified.
changedtick number of changes made to the buffer.
hidden TRUE if the buffer is hidden.
listed TRUE if the buffer is listed.
lnum current line number in buffer.
loaded TRUE if the buffer is loaded.
name full path to the file in the buffer.
nr buffer number.
options dictionary of buffer local options.
variables dictionary of buffer local variables.
Function: getbufinfo([{dict}])
Returns information about all the buffers matching the criteria
specified in the {dict} dictionary. The following keys can be
specified in {dict}:
buflisted include only listed buffers.
bufloaded include only loaded buffers.
2. Function: getwininfo([{win_id}])
Returns information about all the windows as a List. If {win_id} is
not supplied, then information about all the windows in all the tab
pages is returned as a List. If {win_id} is supplied, then
information about the window with ID {win_id} is returned as a Dict.
Each list item is a dictionary with the following entries:
nr window number.
tpnr tab page number.
winid window ID.
height window height.
width window width.
bufnum number of buffer in the window.
options dictionary of window local options.
variables dictionary of window local variables.
3. Function: gettabinfo([{arg}])
Returns information about all the tab pages as a List of
dictionaries. If {arg} is not specified, then information about all
the tab pages is returned as a List. Each list item is a dictionary.
Otherwise, {arg} specifies the tab page number and a Dict is
returned.
Each list item is a dictionary with the following entries:
nr tab page number.
windows List of window IDs in the tag page.
variables dictionary of tabpage local variables.
Any comments about these new functions?
Thanks,
Yegappan
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.