aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorMichal Liszcz <liszcz.michal@gmail.com>2023-03-11 04:22:22 +0100
committerGitHub <noreply@github.com>2023-03-11 11:22:22 +0800
commit674e23f19c509381e2476a3990e21272e362e3a4 (patch)
tree5c14e0497c12e5caad1965f3793031974eb1a405 /runtime
parent8cb5b995b6e4d86035e6950d92c0c68ab4e46787 (diff)
downloadrneovim-674e23f19c509381e2476a3990e21272e362e3a4.tar.gz
rneovim-674e23f19c509381e2476a3990e21272e362e3a4.tar.bz2
rneovim-674e23f19c509381e2476a3990e21272e362e3a4.zip
vim-patch:9.0.0244: cannot easily get the list of sourced scripts (#22596)
Problem: Cannot easily get the list of sourced scripts. Solution: Add the getscriptinfo() function. (Yegappan Lakshmanan, closes vim/vim#10957) https://github.com/vim/vim/commit/f768c3d19c518822d89dec4cc3947ddeea249316 Cherry-pick usr_41.txt change from a later runtime update. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/builtin.txt11
-rw-r--r--runtime/doc/usr_41.txt16
2 files changed, 20 insertions, 7 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 5e918a19f4..0e04e9035b 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -223,6 +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
gettabinfo([{expr}]) List list of tab pages
gettabvar({nr}, {varname} [, {def}])
any variable {varname} in tab {nr} or {def}
@@ -3576,6 +3577,16 @@ 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.
+
+ 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>|.
+
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 ed16f837cf..17a34b1236 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1056,6 +1056,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
+
Context Stack: *ctx-functions*
ctxget() return context at given index from top
ctxpop() pop and restore top context
@@ -1072,6 +1080,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
libcall() call a function in an external library
libcallnr() idem, returning a number
@@ -1079,13 +1088,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