docs: add some missing changes from Vim runtime updates (#23533)

This commit is contained in:
zeertzjq 2023-05-08 13:57:24 +08:00 committed by GitHub
parent 01f81ed89e
commit 057a5bc78d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -4270,10 +4270,10 @@ The input is in the variable "line", the results in the variables "file",
getting the scriptnames in a Dictionary ~ getting the scriptnames in a Dictionary ~
*scriptnames-dictionary* *scriptnames-dictionary*
The |:scriptnames| command can be used to get a list of all script files that The `:scriptnames` command can be used to get a list of all script files that
have been sourced. There is no equivalent function or variable for this have been sourced. There is also the `getscriptinfo()` function, but the
(because it's rarely needed). In case you need to manipulate the list this information returned is not exactly the same. In case you need to manipulate
code can be used: > the output of `scriptnames` this code can be used: >
" Get the output of ":scriptnames" in the scriptnames_output variable. " Get the output of ":scriptnames" in the scriptnames_output variable.
let scriptnames_output = '' let scriptnames_output = ''
redir => scriptnames_output redir => scriptnames_output

View File

@ -338,8 +338,8 @@ Example of using <Cmd> halfway Insert mode: >
nnoremap <F3> aText <Cmd>echo mode(1)<CR> Added<Esc> nnoremap <F3> aText <Cmd>echo mode(1)<CR> Added<Esc>
Unlike <expr> mappings, there are no special restrictions on the <Cmd> Unlike <expr> mappings, there are no special restrictions on the <Cmd>
command: it is executed as if an (unrestricted) |autocmd| was invoked command: it is executed as if an (unrestricted) |autocommand| was invoked
or an async event event was processed. or an async event was processed.
Note: Note:
- Because <Cmd> avoids mode-changes (unlike ":") it does not trigger - Because <Cmd> avoids mode-changes (unlike ":") it does not trigger
@ -638,6 +638,7 @@ not to be matched with any key sequence. This is useful in plugins
*<MouseMove>* *<MouseMove>*
The special key name "<MouseMove>" can be used to handle mouse movement. It The special key name "<MouseMove>" can be used to handle mouse movement. It
needs to be enabled with 'mousemoveevent'. needs to be enabled with 'mousemoveevent'.
The |getmousepos()| function can be used to obtain the mouse position.
*<Char>* *<Char->* *<Char>* *<Char->*
To map a character by its decimal, octal or hexadecimal number the <Char> To map a character by its decimal, octal or hexadecimal number the <Char>

View File

@ -336,6 +336,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
:scr[iptnames] List all sourced script names, in the order they were :scr[iptnames] List all sourced script names, in the order they were
first sourced. The number is used for the script ID first sourced. The number is used for the script ID
|<SID>|. |<SID>|.
Also see `getscriptinfo()`.
:scr[iptnames][!] {scriptId} *:script* :scr[iptnames][!] {scriptId} *:script*
Edit script {scriptId}. Although ":scriptnames name" Edit script {scriptId}. Although ":scriptnames name"