neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 0774d0cfe1d5efb4bdd34cc8cf3799af5c947d2e
parent cfe23a80f086d1e0c188a88f28ab1b459400e5d4
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Mon,  6 Nov 2023 19:03:08 +0800

vim-patch:da4e433dc3be (#25912)

runtime(doc): document vim-script library function

https://github.com/vim/vim/commit/da4e433dc3bee7fa521df3c7235d49a6732134ef

Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat:
Mruntime/doc/eval.txt | 27+++++++++++++++++++++++++++
Mruntime/doc/pi_gzip.txt | 10+++++++++-
Mruntime/doc/pi_zip.txt | 7+++++++
3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt @@ -4354,6 +4354,33 @@ This is not allowed when the textlock is active: - 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* Expressions entered by the user in |i_CTRL-R_=|, |c_CTRL-\_e|, |quote=| are diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt @@ -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: diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt @@ -70,6 +70,13 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright* 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~ If for some reason you do not wish to use vim to examine zipped files,