mirror of
				https://github.com/vim/vim.git
				synced 2025-10-30 09:47:20 -04:00 
			
		
		
		
	runtime(doc): document vim-script library function
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| *eval.txt*	For Vim version 9.0.  Last change: 2023 Jun 01 | ||||
| *eval.txt*	For Vim version 9.0.  Last change: 2023 Nov 05 | ||||
|  | ||||
|  | ||||
| 		  VIM REFERENCE MANUAL	  by Bram Moolenaar | ||||
| @@ -36,6 +36,7 @@ a remark is given. | ||||
| 11. No +eval feature		|no-eval-feature| | ||||
| 12. The sandbox			|eval-sandbox| | ||||
| 13. Textlock			|textlock| | ||||
| 14. Vim script library		|vim-script-library| | ||||
|  | ||||
| Testing support is documented in |testing.txt|. | ||||
| Profiling is documented at |profiling|. | ||||
| @@ -4801,5 +4802,37 @@ This is not allowed when the textlock is active: | ||||
| 	- closing a window or quitting Vim | ||||
| 	- etc. | ||||
|  | ||||
| ============================================================================== | ||||
| 14. 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. | ||||
|  | ||||
| The functions are available as |Vim9-script| as well as using legacy vim | ||||
| script (to be used for non Vim 9.0 versions and Neovim). | ||||
|  | ||||
| 							*dist#vim* *dist#vim9* | ||||
| The functions make use of the autoloaded prefix "dist#vim" (for legacy Vim script and | ||||
| Neovim) and "dist#vim9" for Vim9 script. | ||||
|  | ||||
| The following functions are available: | ||||
|  | ||||
| dist#vim#IsSafeExecutable(filetype, executable) ~ | ||||
| dist#vim9#IsSafeExecutable(filetype:string, executable:string): bool ~ | ||||
|  | ||||
| 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 | ||||
|  | ||||
|  | ||||
|  vim:tw=78:ts=8:noet:ft=help:norl: | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| *pi_gzip.txt*   For Vim version 9.0.  Last change: 2019 May 05 | ||||
| *pi_gzip.txt*   For Vim version 9.0.  Last change: 2023 Nov 05 | ||||
|  | ||||
|  | ||||
| 		  VIM REFERENCE MANUAL    by Bram Moolenaar | ||||
| @@ -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: | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| *pi_zip.txt*	For Vim version 9.0.  Last change: 2023 Mar 12 | ||||
| *pi_zip.txt*	For Vim version 9.0.  Last change: 2023 Nov 05 | ||||
|  | ||||
| 				+====================+ | ||||
| 				| Zip File Interface | | ||||
| @@ -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~ | ||||
|  | ||||
|   | ||||
| @@ -6758,6 +6758,8 @@ dircolors.vim	syntax.txt	/*dircolors.vim* | ||||
| dis	motion.txt	/*dis* | ||||
| disable-menus	gui.txt	/*disable-menus* | ||||
| discard	editing.txt	/*discard* | ||||
| dist#vim	eval.txt	/*dist#vim* | ||||
| dist#vim9	eval.txt	/*dist#vim9* | ||||
| distribute-script	usr_51.txt	/*distribute-script* | ||||
| distributed-plugins	usr_05.txt	/*distributed-plugins* | ||||
| distribution	intro.txt	/*distribution* | ||||
| @@ -7422,6 +7424,7 @@ g:gnat.Project_File	ft_ada.txt	/*g:gnat.Project_File* | ||||
| g:gnat.Set_Project_File()	ft_ada.txt	/*g:gnat.Set_Project_File()* | ||||
| g:gnat.Tags()	ft_ada.txt	/*g:gnat.Tags()* | ||||
| g:gnat.Tags_Command	ft_ada.txt	/*g:gnat.Tags_Command* | ||||
| g:gzip_exec	pi_gzip.txt	/*g:gzip_exec* | ||||
| g:html_charset_override	syntax.txt	/*g:html_charset_override* | ||||
| g:html_diff_one_file	syntax.txt	/*g:html_diff_one_file* | ||||
| g:html_dynamic_folds	syntax.txt	/*g:html_dynamic_folds* | ||||
| @@ -7616,6 +7619,7 @@ g:vimsyn_minlines	syntax.txt	/*g:vimsyn_minlines* | ||||
| g:vimsyn_noerror	syntax.txt	/*g:vimsyn_noerror* | ||||
| g:yaml_schema	syntax.txt	/*g:yaml_schema* | ||||
| g:zipPlugin_ext	pi_zip.txt	/*g:zipPlugin_ext* | ||||
| g:zip_exec	pi_zip.txt	/*g:zip_exec* | ||||
| g:zip_extractcmd	pi_zip.txt	/*g:zip_extractcmd* | ||||
| g:zip_nomax	pi_zip.txt	/*g:zip_nomax* | ||||
| g:zip_shq	pi_zip.txt	/*g:zip_shq* | ||||
| @@ -10987,6 +10991,7 @@ vim-modes	intro.txt	/*vim-modes* | ||||
| vim-modes-intro	intro.txt	/*vim-modes-intro* | ||||
| vim-raku	ft_raku.txt	/*vim-raku* | ||||
| vim-script-intro	usr_41.txt	/*vim-script-intro* | ||||
| vim-script-library	eval.txt	/*vim-script-library* | ||||
| vim-use	intro.txt	/*vim-use* | ||||
| vim-variable	eval.txt	/*vim-variable* | ||||
| vim.b	if_lua.txt	/*vim.b* | ||||
|   | ||||
		Reference in New Issue
	
	Block a user