Home Explore Blog CI



neovim

24th chunk of `runtime/doc/map.txt`
87696549487640c2df2417811f3b80d22af1c2b0a5af69260000000100000927
 sequences are

						*<line1>*
	<line1>	The starting line of the command range.
						*<line2>*
	<line2>	The final line of the command range.
						*<range>*
	<range> The number of items in the command range: 0, 1 or 2
						*<count>*
	<count>	Any count supplied (as described for the '-range'
		and '-count' attributes).
						*<bang>*
	<bang>	(See the '-bang' attribute) Expands to a ! if the
		command was executed with a ! modifier, otherwise
		expands to nothing.
					*<mods>* *<q-mods>* *:command-modifiers*
	<mods>  The command modifiers, if specified. Otherwise, expands to
		nothing. Supported modifiers are |:aboveleft|, |:belowright|,
		|:botright|, |:browse|, |:confirm|, |:hide|, |:horizontal|,
		|:keepalt|, |:keepjumps|, |:keepmarks|, |:keeppatterns|,
		|:leftabove|, |:lockmarks|, |:noautocmd|, |:noswapfile|,
		|:rightbelow|, |:sandbox|, |:silent|, |:tab|, |:topleft|,
		|:unsilent|, |:verbose|, and |:vertical|.
		Note that |:filter| is not supported.
		Examples: >
		    command! -nargs=+ -complete=file MyEdit
				\ for f in expand(<q-args>, 0, 1) |
				\ exe '<mods> split ' .. f |
				\ endfor

		    function! SpecialEdit(files, mods)
			for f in expand(a:files, 0, 1)
			    exe a:mods .. ' split ' .. f
			endfor
		    endfunction
		    command! -nargs=+ -complete=file Sedit
				\ call SpecialEdit(<q-args>, <q-mods>)
<
						*<reg>* *<register>*
	<reg>	(See the '-register' attribute) The optional register,
		if specified.  Otherwise, expands to nothing.  <register>
		is a synonym for this.
						*<args>*
	<args>	The command arguments, exactly as supplied (but as
		noted above, any count or register can consume some
		of the arguments, which are then not part of <args>).
	<lt>	A single '<' (Less-Than) character.  This is needed if you
		want to get a literal copy of one of these escape sequences
		into the expansion - for example, to get <bang>, use
		<lt>bang>.

							*<q-args>*
If the first two characters of an escape sequence are "q-" (for example,
<q-args>) then the value is quoted in such a way as to make it a valid value
for use in an expression.  This uses the argument as one single value.
When there is no argument <q-args> is an empty string.  See the
|q-args-example| below.
							*<f-args>*
To allow commands to pass their arguments on to a user-defined function, there
is a special form

Title: More Replacement Text Sequences in Vim Commands
Summary
This section details additional replacement text sequences available in Vim commands, including <reg> (or <register>) for accessing the register name, <args> for the command arguments, and <lt> for escaping '<'. It also explains the use of quoted sequences like <q-args> for use in expressions, and <f-args> for passing arguments to user-defined functions.