>>     :h bufnr()
>>     :h winnr()
>>     :h winbufnr()
>>     :h bufwinnr()
>>     :h tabpagebuflist()
>
> These functions return the number of something not the count of
> something what was what I intended.

But they can be used to determine what you want...something like

  let buf2win={} | windo if has_key(buf2win, winbufnr(0)) | call 
add(buf2win[winbufnr(0)], winnr())| else | let 
buf2win[winbufnr(0)]=[winnr()] | endif

This builds the variable "buf2win" which is a dictionary of 
buffer-number to list-of-windows-into-this-buffer.  For example, 
I set up three buffers and 3 windows into the first buffer, 
getting the following results back:

   :echo buf2win
   {'1': [5], '2': [4], '3': [1, 2, 3]}

With the above, I leave the "how many windows are there into this 
buffer" solution as an exercise to the reader.

> how it is split (h/v) 

I'm not sure one can readily tell how it's split (h/v) because a 
window can be both horizontally and vertically split.  One might 
be able to divine this from session files that are able to 
re-split out windows to their original layout, but otherwise, I 
know of nothing.

> and whether the same buffer is shown or different file and
> what files are displayed?


Not sure what you're asking here, but Andy's suggestion of the 
above functions should help you code up something to get close to 
what you want.

-tim




--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to