vim-patch:da4e433dc3be (#25912)

runtime(doc): document vim-script library function

da4e433dc3

Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq 2023-11-06 19:03:08 +08:00 committed by GitHub
parent cfe23a80f0
commit 0774d0cfe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 1 deletions

View File

@ -4353,6 +4353,33 @@ This is not allowed when the textlock is active:
- closing a window or quitting Vim
- etc.
==============================================================================
Vim script library *vim-script-library*
Vim comes bundled with a Vim script library, that can be used by runtime,
script authors. Currently, it only includes very few functions, but it may
grow over time.
*dist#vim*
The functions make use of the autoloaded prefix "dist#vim".
The following functions are available:
dist#vim#IsSafeExecutable(filetype, executable) ~
This function takes a filetype and an executable and checks whether it is safe
to execute the given executable. For security reasons users may not want to
have Vim execute random executables or may have forbidden to do so for
specific filetypes by setting the "<filetype>_exec" variable (|plugin_exec|).
It returns |TRUE| or |FALSE| to indicate whether the plugin should run the given
exectuable. It takes the following arguments:
argument type ~
filetype string
executable string
==============================================================================
Command-line expressions highlighting *expr-highlight*

View File

@ -12,9 +12,17 @@ The functionality mentioned here is a |standard-plugin|.
This plugin is only available if 'compatible' is not set.
You can avoid loading this plugin by setting the "loaded_gzip" variable: >
:let loaded_gzip = 1
<
*g:gzip_exec*
For security reasons, one may prevent that Vim runs executables automatically
when opening a buffer. This option (default: "1") can be used to prevent
executing the executables command when set to "0": >
:let g:gzip_exec = 0
<
==============================================================================
1. Autocommands *gzip-autocmd*
2. Autocommands *gzip-autocmd*
The plugin installs autocommands to intercept reading and writing of files
with these extensions:

View File

@ -69,6 +69,13 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
This option specifies the program (and any options needed) used to
extract a file from a zip archive. By default, >
let g:zip_extractcmd= g:zip_unzipcmd
<
*g:zip_exec*
For security reasons, one may prevent that Vim runs executables
automatically when opening a buffer. This option (default: "1")
can be used to prevent executing the "unzip" command when set to
"0": >
let g:zip_exec=0
<
PREVENTING LOADING~