Home Explore Blog CI



neovim

12th chunk of `runtime/doc/windows.txt`
75a354a911049f5b4d4acdd162d2038d3c71994ee067a4080000000100000fa5
 no argument list, the window is
		not split.  Also see |++opt| and |+cmd|.

						*:dr* *:drop*
:dr[op] [++opt] [+cmd] {file} ..
		Edit the first {file} in a window.
		- If the file is already open in a window change to that
		  window.
		- If the file is not open in a window edit the file in the
		  current window.  If the current buffer can't be |abandon|ed,
		  the window is split first.
		- Windows that are not in the argument list or are not full
		  width will be closed if possible.
		The |argument-list| is set, like with the |:next| command.
		The purpose of this command is that it can be used from a
		program that wants Vim to edit another file, e.g., a debugger.
		When using the |:tab| modifier each argument is opened in a
		tab page.  The last window is used if it's empty.
		Also see |++opt| and |+cmd|.

==============================================================================
8. Do a command in all buffers or windows			*list-repeat*

							*:windo*
:[range]windo {cmd}	Execute {cmd} in each |focusable| window, or only for
			windows in a given [range] of window numbers. It works
			like doing this: >
				CTRL-W t
				:{cmd}
				CTRL-W w
				:{cmd}
				etc.
<			This only operates in the current tab page.
			When an error is detected on one window, further
			windows will not be visited.
			The last window (or where an error occurred) becomes
			the current window.
			{cmd} can contain '|' to concatenate several commands.
			{cmd} must not open or close windows or reorder them.

			Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|,
			|:cfdo| and |:lfdo|.

							*:bufdo*
:[range]bufdo[!] {cmd}	Execute {cmd} in each buffer in the buffer list or if
			[range] is given only for buffers for which their
			buffer number is in the [range]. It works like doing
			this: >
				:bfirst
				:{cmd}
				:bnext
				:{cmd}
				etc.
<			When the current file can't be |abandon|ed and the [!]
			is not present, the command fails.
			When an error is detected on one buffer, further
			buffers will not be visited.
			Unlisted buffers are skipped.
			The last buffer (or where an error occurred) becomes
			the current buffer.
			{cmd} can contain '|' to concatenate several commands.
			{cmd} must not delete buffers or add buffers to the
			buffer list.
			Note: While this command is executing, the Syntax
			autocommand event is disabled by adding it to
			'eventignore'.  This considerably speeds up editing
			each buffer.

			Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|,
			|:cfdo| and |:lfdo|.

Examples: >

	:windo set nolist foldcolumn=0 | normal! zn

This resets the 'list' option and disables folding in all windows. >

	:bufdo set fileencoding= | update

This resets the 'fileencoding' in each buffer and writes it if this changed
the buffer.  The result is that all buffers will use the 'encoding' encoding
(if conversion succeeds).

==============================================================================
9. Tag or file name under the cursor			*window-tag*

							*:sta* *:stag*
:sta[g][!] [tagname]
		Does ":tag[!] [tagname]" and splits the window for the found
		tag.  See also |:tag|.

CTRL-W ]					*CTRL-W_]* *CTRL-W_CTRL-]*
CTRL-W CTRL-]	Split current window in two.  Use identifier under cursor as a
		tag and jump to it in the new upper window.
		In Visual mode uses the Visually selected text as a tag.
		Make new window N high.

							*CTRL-W_g]*
CTRL-W g ]	Split current window in two.  Use identifier under cursor as a
		tag and perform ":tselect" on it in the new upper window.
		In Visual mode uses the Visually selected text as a tag.
		Make new window N high.

							*CTRL-W_g_CTRL-]*
CTRL-W g CTRL-]	Split current window in two.  Use identifier under cursor as a
		tag and perform ":tjump" on it in the new upper window.
		In Visual mode uses the Visually selected text as a tag.
		Make new window N high.

CTRL-W f					*CTRL-W_f* *CTRL-W_CTRL-F*
CTRL-W CTRL-F	Split current window in two.  Edit file name under cursor.

Title: Executing Commands in Multiple Buffers/Windows and Tag Navigation
Summary
This section describes commands for executing a command in multiple buffers or windows, specifically ':windo' and ':bufdo', including their syntax and limitations. It provides examples of how to use these commands to modify settings or update files. Additionally, it covers commands related to tag navigation, such as ':stag' and various CTRL-W key combinations, which allow splitting the window and jumping to tags or files under the cursor.