diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 3c940ccfa2..cb05718ab9 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -223,7 +223,7 @@ getreg([{regname} [, 1 [, {list}]]]) String or List contents of a register getreginfo([{regname}]) Dict information about a register getregtype([{regname}]) String type of a register -getscriptinfo() List list of sourced scripts +getscriptinfo([{opts}]) List list of sourced scripts gettabinfo([{expr}]) List list of tab pages gettabvar({nr}, {varname} [, {def}]) any variable {varname} in tab {nr} or {def} @@ -3576,16 +3576,42 @@ getregtype([{regname}]) *getregtype()* Can also be used as a |method|: > GetRegname()->getregtype() -getscriptinfo() *getscriptinfo()* +getscriptinfo([{opts}]) *getscriptinfo()* Returns a |List| with information about all the sourced Vim - scripts in the order they were sourced. + 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 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. - name vim script file name. - sid script ID |<SID>|. + 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 the 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 Vimscript version, always 1 + Examples: > + :echo getscriptinfo({'name': 'myscript'}) + :echo getscriptinfo({'sid': 15}).variables +< gettabinfo([{tabnr}]) *gettabinfo()* If {tabnr} is not specified, then information about all the tab pages is returned as a |List|. Each List item is a |