Home Explore Blog CI



neovim

50th chunk of `runtime/doc/vimfn.txt`
e1702bb6c322cf016813a21e4ea5a4dbe552bfb95cc0615c0000000100000fab

		are ignored.  The returned dictionary contains the entry
		"items" with the list of entries.

		The returned dictionary contains the following entries:
			changedtick	total number of changes made to the
					list |quickfix-changedtick|
			context	quickfix list context. See |quickfix-context|
				If not present, set to "".
			id	quickfix list ID |quickfix-ID|. If not
				present, set to 0.
			idx	index of the quickfix entry in the list. If not
				present, set to 0.
			items	quickfix list entries. If not present, set to
				an empty list.
			nr	quickfix list number. If not present, set to 0
			qfbufnr	number of the buffer displayed in the quickfix
				window. If not present, set to 0.
			size	number of entries in the quickfix list. If not
				present, set to 0.
			title	quickfix list title text. If not present, set
				to "".
			winid	quickfix |window-ID|. If not present, set to 0

		Examples (See also |getqflist-examples|): >vim
			echo getqflist({'all': 1})
			echo getqflist({'nr': 2, 'title': 1})
			echo getqflist({'lines' : ["F1:10:L10"]})
<

                Parameters: ~
                  • {what} (`table?`)

                Return: ~
                  (`any`)

getreg([{regname} [, 1 [, {list}]]])                                  *getreg()*
		The result is a String, which is the contents of register
		{regname}.  Example: >vim
			let cliptext = getreg('*')
<		When register {regname} was not set the result is an empty
		string.
		The {regname} argument must be a string.

		getreg('=') returns the last evaluated value of the expression
		register.  (For use in maps.)
		getreg('=', 1) returns the expression itself, so that it can
		be restored with |setreg()|.  For other registers the extra
		argument is ignored, thus you can always give it.

		If {list} is present and |TRUE|, the result type is changed
		to |List|. Each list item is one text line. Use it if you care
		about zero bytes possibly present inside register: without
		third argument both NLs and zero bytes are represented as NLs
		(see |NL-used-for-Nul|).
		When the register was not set an empty list is returned.

		If {regname} is not specified, |v:register| is used.

                Parameters: ~
                  • {regname} (`string?`)
                  • {expr} (`any?`)
                  • {list} (`nil|false?`)

                Return: ~
                  (`string`)

getreginfo([{regname}])                                           *getreginfo()*
		Returns detailed information about register {regname} as a
		Dictionary with the following entries:
			regcontents	List of lines contained in register
					{regname}, like
					getreg({regname}, 1, 1).
			regtype		the type of register {regname}, as in
					|getregtype()|.
			isunnamed	Boolean flag, v:true if this register
					is currently pointed to by the unnamed
					register.
			points_to	for the unnamed register, gives the
					single letter name of the register
					currently pointed to (see |quotequote|).
					For example, after deleting a line
					with `dd`, this field will be "1",
					which is the register that got the
					deleted text.

		The {regname} argument is a string.  If {regname} is invalid
		or not set, an empty Dictionary will be returned.
		If {regname} is not specified, |v:register| is used.
		The returned Dictionary can be passed to |setreg()|.

                Parameters: ~
                  • {regname} (`string?`)

                Return: ~
                  (`table`)

getregion({pos1}, {pos2} [, {opts}])                               *getregion()*
		Returns the list of strings from {pos1} to {pos2} from a
		buffer.

		{pos1} and {pos2} must both be |List|s with four numbers.
		See |getpos()| for the format of the list.  It's possible
		to specify positions from a different buffer, but please
		note the limitations at |getregion-notes|.

		The optional argument {opts} is a Dict and supports the
		following items:

			type		Specify the region's selection type.
					See |getregtype()| for

Title: Exploring `getqflist()`, `getreg()`, `getreginfo()`, and `getregion()`: Functions and their applications
Summary
This section provides detailed information on four Vim functions: `getqflist()`, `getreg()`, `getreginfo()`, and `getregion()`. It explains the return dictionary structure of `getqflist()`, including entries like `changedtick`, `context`, `id`, `idx`, `items`, `nr`, `qfbufnr`, `size`, `title`, and `winid`. It offers examples of how to use `getqflist()` with the 'all', 'nr', and 'lines' options. The documentation explains how `getreg()` retrieves the contents of a register, specifying that the return type is a string. It clarifies the behavior of `getreg('=')` and the use of the optional {list} argument. Furthermore, `getreginfo()` returns a dictionary with information about a register, including its contents, type, whether it's the unnamed register, and what register the unnamed register points to. Finally, `getregion()` returns a list of strings representing a region within a buffer defined by two positions.