diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-08-22 13:15:13 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-22 13:15:13 +0100 |
commit | f768c3d19c518822d89dec4cc3947ddeea249316 (patch) | |
tree | 5653c5bbaa38515ba7401fed81da6972971a260e /runtime | |
parent | e89aeed43e6eca1bda5379cf9b437bce3bc56628 (diff) |
patch 9.0.0244: cannot easily get the list of sourced scriptsv9.0.0244
Problem: Cannot easily get the list of sourced scripts.
Solution: Add the getscriptinfo() function. (Yegappan Lakshmanan,
closes #10957)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 13 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 16 |
2 files changed, 22 insertions, 7 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 7ddc4a3ee5..00ae665f8b 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -253,6 +253,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 gettabinfo([{expr}]) List list of tab pages gettabvar({nr}, {varname} [, {def}]) any variable {varname} in tab {nr} or {def} @@ -4088,6 +4089,18 @@ getregtype([{regname}]) *getregtype()* Can also be used as a |method|: > GetRegname()->getregtype() +getscriptinfo() *getscriptinfo()* + Returns a |List| with information about all the sourced Vim + scripts in the order they were sourced. (|:scriptinfo|) + + Each item in the returned List is a |Dict| with the following + items: + autoload set to TRUE for a script that was used with + |import autoload| but was not actually sourced + yet. + name vim script file name. + sid script ID |<SID>|. + 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 diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 1938e35460..4e210a65ae 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1310,6 +1310,14 @@ Prompt Buffer: *promptbuffer-functions* prompt_setinterrupt() set interrupt callback for a buffer prompt_setprompt() set the prompt text for a buffer +Registers: *register-functions* + getreg() get contents of a register + getreginfo() get information about a register + getregtype() get type of a register + setreg() set contents and type of a register + reg_executing() return the name of the register being executed + reg_recording() return the name of the register being recorded + Text Properties: *text-property-functions* prop_add() attach a property at a position prop_add_list() attach a property at multiple positions @@ -1341,6 +1349,7 @@ Various: *various-functions* did_filetype() check if a FileType autocommand was used eventhandler() check if invoked by an event handler getpid() get process ID of Vim + getscriptinfo() get list of sourced vim scripts getimstatus() check if IME status is active interrupt() interrupt script execution windowsversion() get MS-Windows version @@ -1352,13 +1361,6 @@ Various: *various-functions* undofile() get the name of the undo file undotree() return the state of the undo tree - getreg() get contents of a register - getreginfo() get information about a register - getregtype() get type of a register - setreg() set contents and type of a register - reg_executing() return the name of the register being executed - reg_recording() return the name of the register being recorded - shiftwidth() effective value of 'shiftwidth' wordcount() get byte/word/char count of buffer |