Home Explore Blog CI



neovim

10th chunk of `runtime/doc/editing.txt`
a108e684ad6b43812ab85159115a860245ec24ecbe4d7bc40000000100000fa4
 the argument list twice |:argded|.
			This is like using |:argadd| and then |:edit| (with
			the small exception that |:edit| does not change the
			argument list, so the argument list pointer isn't
			changed).
			Spaces in filenames have to be escaped with "\".
			[count] is used like with |:argadd|.
			If the current file cannot be |abandon|ed {name}s will
			still be added to the argument list, but won't be
			edited. No check for duplicates is done.
			Also see |++opt| and |+cmd|.

:[count]arga[dd] {name} ..			*:arga* *:argadd* *E479*
:[count]arga[dd]						*E1156*
			Add the {name}s to the argument list.  When {name} is
			omitted add the current buffer name to the argument
			list.
			If [count] is omitted, the {name}s are added just
			after the current entry in the argument list.
			Otherwise they are added after the [count]'th file.
			If the argument list is "a b c", and "b" is the
			current argument, then these commands result in:
				command		new argument list ~
				:argadd x	a  [b]  x  c
				:0argadd x	x   a  [b] c
				:1argadd x	a   x  [b] c
				:$argadd x	a  [b]  c  x
			And after the last one:
				:+2argadd y	a  [b]  c  x  y
			There is no check for duplicates, it is possible to
			add a file to the argument list twice.  You can use
			|:argdedupe| to fix it afterwards: >
				:argadd *.txt | argdedupe
<			The currently edited file is not changed.
			Note: you can also use this method: >
				:args ## x
<			This will add the "x" item and sort the new list.

:argded[upe]					*:argded* *:argdedupe*
			Remove duplicate filenames from the argument list.
			If your current file is a duplicate, your current file
			will change to the original file index.

:argd[elete] {pattern} ..		*:argd* *:argdelete* *E480* *E610*
			Delete files from the argument list that match the
			{pattern}s.  {pattern} is used like a file pattern,
			see |file-pattern|.  "%" can be used to delete the
			current entry.
			This command keeps the currently edited file, also
			when it's deleted from the argument list.
			Example: >
				:argdel *.obj

:[range]argd[elete]	Delete the [range] files from the argument list.
			Example: >
				:10,$argdel
<			Deletes arguments 10 and further, keeping 1-9. >
				:$argd
<			Deletes just the last one. >
				:argd
				:.argd
<			Deletes the current argument. >
				:%argd
<			Removes all the files from the arglist.
			When the last number in the range is too high, up to
			the last argument is deleted.

							*:argu* *:argument*
:[count]argu[ment] [count] [++opt] [+cmd]
			Edit file [count] in the argument list.  When [count]
			is omitted the current entry is used.  This fails
			when changes have been made and Vim does not want to
			|abandon| the current buffer.
			Also see |++opt| and |+cmd|.

:[count]argu[ment]! [count] [++opt] [+cmd]
			Edit file [count] in the argument list, discard any
			changes to the current buffer.  When [count] is
			omitted the current entry is used.
			Also see |++opt| and |+cmd|.

:[count]n[ext] [++opt] [+cmd]			*:n* *:ne* *:next* *E165* *E163*
			Edit [count] next file.  This fails when changes have
			been made and Vim does not want to |abandon| the
			current buffer.  Also see |++opt| and |+cmd|.

								*]a*
]a			Mapped to |:next|. |default-mappings|

:[count]n[ext]! [++opt] [+cmd]
			Edit [count] next file, discard any changes to the
			buffer.  Also see |++opt| and |+cmd|.

:n[ext] [++opt] [+cmd] {arglist}			*:next_f*
			Same as |:args_f|.

:n[ext]! [++opt] [+cmd] {arglist}
			Same as |:args_f!|.

:[count]N[ext] [count] [++opt] [+cmd]			*:Next* *:N* *E164*
			Edit [count] previous file in argument list.  This
			fails when changes have been made and Vim does not
			want to |abandon| the current buffer.
			Also see |++opt| and |+cmd|.

:[count]N[ext]! [count] [++opt] [+cmd]
			Edit [count] previous file in argument list.  Discard
			any changes to the buffer.  Also see |++opt| and
			|+cmd|.

:[count]prev[ious] [count] [++opt] [+cmd]		*:prev* *:previous*
			Same as :Next.

Title: Argument List Manipulation Commands in Vim
Summary
This section details Vim commands for manipulating the argument list, including `:argadd` for adding files, `:argdedupe` for removing duplicates, `:argdelete` for removing files matching patterns, and `:argument` for editing specific files. It also covers navigation commands like `:next` and `:previous` to move through the argument list. The section provides examples of how each command affects the argument list and highlights error conditions and special cases.