*getregionpos()*
Same as |getregion()|, but returns a list of positions
describing the buffer text segments bound by {pos1} and
{pos2}.
The segments are a pair of positions for every line: >
[[{start_pos}, {end_pos}], ...]
<
The position is a |List| with four numbers:
[bufnum, lnum, col, off]
"bufnum" is the buffer number.
"lnum" and "col" are the position in the buffer. The first
column is 1.
If the "off" number of a starting position is non-zero, it is
the offset in screen columns from the start of the character.
E.g., a position within a <Tab> or after the last character.
If the "off" number of an ending position is non-zero, it is
the offset of the character's first cell not included in the
selection, otherwise all its cells are included.
Apart from the options supported by |getregion()|, {opts} also
supports the following:
eol If |TRUE|, indicate positions beyond
the end of a line with "col" values
one more than the length of the line.
If |FALSE|, positions are limited
within their lines, and if a line is
empty or the selection is entirely
beyond the end of a line, a "col"
value of 0 is used for both positions.
(default: |FALSE|)
Parameters: ~
• {pos1} (`[integer, integer, integer, integer]`)
• {pos2} (`[integer, integer, integer, integer]`)
• {opts}
(`{type?:string, exclusive?:boolean, eol?:boolean}?`)
Return: ~
(`[ [integer, integer, integer, integer], [integer, integer, integer, integer] ][]`)
getregtype([{regname}]) *getregtype()*
The result is a String, which is type of register {regname}.
The value will be one of:
"v" for |charwise| text
"V" for |linewise| text
"<CTRL-V>{width}" for |blockwise-visual| text
"" for an empty or unknown register
<CTRL-V> is one character with value 0x16.
The {regname} argument is a string. If {regname} is not
specified, |v:register| is used.
Parameters: ~
• {regname} (`string?`)
Return: ~
(`string`)
getscriptinfo([{opts}]) *getscriptinfo()*
Returns a |List| with information about all the sourced Vim
scripts in the order they were sourced, like what
`:scriptnames` shows.
The optional Dict argument {opts} supports the following
optional items:
name Script name match pattern. If specified,
and "sid" is not specified, information about
scripts with a name that match the pattern
"name" are returned.
sid Script ID |<SID>|. If specified, only
information about the script with ID "sid" is
returned and "name" is ignored.
Each item in the returned List is a |Dict| with the following
items:
autoload Always set to FALSE.
functions List of script-local function names defined in
the script. Present only when a particular
script is specified using the "sid" item in
{opts}.
name Vim script file name.
sid Script ID |<SID>|.
variables A dictionary with the script-local variables.
Present only when a particular script is
specified using the "sid" item in {opts}.
Note that this is a copy, the value of
script-local variables cannot be changed using
this dictionary.
version Vim script version, always 1
Examples: >vim
echo getscriptinfo({'name': 'myscript'})
echo getscriptinfo({'sid': 15})[0].variables
<
Parameters: ~
• {opts} (`table?`)
Return: ~
(`vim.fn.getscriptinfo.ret[]`)
getstacktrace() *getstacktrace()*
Returns the current stack trace of Vim scripts.
Stack trace is a |List|, of which each item is a |Dictionary|
with the following items:
funcref