Home Explore Blog CI



neovim

10th chunk of `runtime/doc/windows.txt`
1cd756f9ab7c493418bbd2a4aeb758e27f181ee5b411988a0000000100000fa9
 |WinResized|, it may slow down editing a bit.

The information provided by |WinScrolled| is a dictionary for each window that
has changes, using the window ID as the key, and a total count of the changes
with the key "all".  Example value for |v:event|: >
	{
	   all: {width: 0, height: 2, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
	   1003: {width: 0, height: -1, leftcol: 0, skipcol: 0, topline: 0, topfill: 0},
	   1006: {width: 0, height: 1, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
	}

Note that the "all" entry has the absolute values of the individual windows
accumulated.

If you need more information about what changed, or you want to "debounce" the
events (not handle every event to avoid doing too much work), you may want to
use the `winlayout()` and `getwininfo()` functions.

|WinScrolled| and |WinResized| do not trigger when the first autocommand is
added, only after the first scroll or resize.  They may trigger when switching
to another tab page.

The commands executed are expected to not cause window size or scroll changes.
If this happens anyway, the event will trigger again very soon.  In other
words: Just before triggering the event, the current sizes and scroll
positions are stored and used to decide whether there was a change.

==============================================================================
7. Argument and buffer list commands			*buffer-list*

      args list		       buffer list	   meaning ~
1. :[N]argument [N]	11. :[N]buffer [N]	to arg/buf N
2. :[N]next [file ..]	12. :[N]bnext [N]	to Nth next arg/buf
3. :[N]Next [N]		13. :[N]bNext [N]	to Nth previous arg/buf
4. :[N]previous	[N]	14. :[N]bprevious [N]	to Nth previous arg/buf
5. :rewind / :first	15. :brewind / :bfirst	to first arg/buf
6. :last		16. :blast		to last arg/buf
7. :all			17. :ball		edit all args/buffers
			18. :unhide		edit all loaded buffers
			19. :[N]bmod [N]	to Nth modified buf

  split & args list	  split & buffer list	   meaning ~
21. :[N]sargument [N]   31. :[N]sbuffer [N]	split + to arg/buf N
22. :[N]snext [file ..] 32. :[N]sbnext [N]      split + to Nth next arg/buf
23. :[N]sNext [N]       33. :[N]sbNext [N]      split + to Nth previous arg/buf
24. :[N]sprevious [N]   34. :[N]sbprevious [N]  split + to Nth previous arg/buf
25. :srewind / :sfirst	35. :sbrewind / :sbfirst split + to first arg/buf
26. :slast		36. :sblast		split + to last arg/buf
27. :sall		37. :sball		edit all args/buffers
			38. :sunhide		edit all loaded buffers
			39. :[N]sbmod [N]	split + to Nth modified buf

40. :args		list of arguments
41. :buffers		list of buffers

The meaning of [N] depends on the command:
 [N] is the number of buffers to go forward/backward on 2/12/22/32,
     3/13/23/33, and 4/14/24/34
 [N] is an argument number, defaulting to current argument, for 1 and 21
 [N] is a buffer number, defaulting to current buffer, for 11 and 31
 [N] is a count for 19 and 39

Note: ":next" is an exception, because it must accept a list of file names
for compatibility with Vi.


------------------------------------------------------------------------------
The argument list and multiple windows

The current position in the argument list can be different for each window.
Remember that when doing ":e file", the position in the argument list stays
the same, but you are not editing the file at that position.  To indicate
this, the file message (and the title, if you have one) shows
"(file (N) of M)", where "(N)" is the current position in the file list, and
"M" the number of files in the file list.

All the entries in the argument list are added to the buffer list.  Thus, you
can also get to them with the buffer list commands, like ":bnext".

:[N]al[l][!] [N]				*:al* *:all* *:sal* *:sall*
:[N]sal[l][!] [N]
		Rearrange the screen to open one window for each argument.
		All other windows are closed.  When a count is given, this is
		the maximum number of windows to open.
		With the |:tab| modifier open a tab page for each argument.
		When there are more arguments

Title: Window Autocommand Behavior and Argument/Buffer List Commands
Summary
This section clarifies that WinScrolled autocommands might slow editing and that WinScrolled provides a dictionary of changes by window ID, with an 'all' entry for accumulated values. It notes the use of winlayout() and getwininfo() for more information or debouncing. The autocommands do not trigger on initial addition, and provides a list of argument and buffer commands and explains how argument lists interact with multiple windows, mentioning file messages and the effect of ':e file'. It also details the ':all' and ':sall' commands for opening a window for each argument.