Skip to content

Commit eb8da2d

Browse files
authored
Merge pull request #1372 from vim-jp/hh-update-eval
Update eval.{txt,jax}
2 parents e28b300 + ad2bce7 commit eb8da2d

File tree

2 files changed

+69
-2
lines changed

2 files changed

+69
-2
lines changed

doc/eval.jax

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim バージョン 9.0. Last change: 2023 Jun 01
1+
*eval.txt* For Vim バージョン 9.0. Last change: 2023 Nov 05
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -34,6 +34,7 @@ Note: 式の評価はコンパイル時に無効化できる。無効化され
3434
11. +eval機能が無効 |no-eval-feature|
3535
12. サンドボックス |eval-sandbox|
3636
13. テキストロック |textlock|
37+
14. Vim script ライブラリ |vim-script-library|
3738

3839
テストのサポートは |testing.txt| を参照。
3940
プロファイリングは |profiling| に記録されている。
@@ -4656,4 +4657,37 @@ Vimの現在の処理を混乱させたり破壊してしまうような動作
46564657
- ウィンドウを閉じたりVimを終了したり
46574658
- その他
46584659

4660+
==============================================================================
4661+
14. Vim script ライブラリ *vim-script-library*
4662+
4663+
Vim には、ランタイムやスクリプト作成者が使用できる Vim script ライブラリがバン
4664+
ドルされている。現時点ではごく少数の関数しか含まれていないが、時間の経過ととも
4665+
に拡張される可能性がある。
4666+
4667+
関数は |Vim9-script| として使用可能である。旧来の vim script (Vim 9.0 以外の
4668+
バージョンおよび Neovim で使用される) でも使用できる。
4669+
4670+
*dist#vim* *dist#vim9*
4671+
関数は、オートロードされたプリフィックス "dist#vim" (旧来の Vim script および
4672+
Neovim の場合) と、Vim9 script の場合 "dist#vim9" を使用する。
4673+
4674+
以下の関数が使用可能:
4675+
4676+
dist#vim#IsSafeExecutable(filetype, executable) ~
4677+
dist#vim9#IsSafeExecutable(filetype:string, executable:string): bool ~
4678+
4679+
この関数は、ファイルタイプと実行可能ファイルを受け取り、与えられた実行ファイル
4680+
を実行しても安全かどうかをチェックする。セキュリティ上の理由から、ユーザーは
4681+
Vim にランダムな実行可能ファイルを実行させたくない場合や、"<filetype>_exec" 変
4682+
数 (|plugin_exec|) を設定して特定のファイルタイプに対する実行を禁止している場
4683+
合がある。
4684+
4685+
|true| または |false| を返し、プラグインが指定された実行可能ファイルを実行する
4686+
必要があるかどうかを示す。次の引数を取る:
4687+
4688+
引数 型 ~
4689+
4690+
filetype string
4691+
executable string
4692+
46594693
vim:tw=78:ts=8:noet:ft=help:norl:

en/eval.txt

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 9.0. Last change: 2023 Jun 01
1+
*eval.txt* For Vim version 9.0. Last change: 2023 Nov 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -36,6 +36,7 @@ a remark is given.
3636
11. No +eval feature |no-eval-feature|
3737
12. The sandbox |eval-sandbox|
3838
13. Textlock |textlock|
39+
14. Vim script library |vim-script-library|
3940

4041
Testing support is documented in |testing.txt|.
4142
Profiling is documented at |profiling|.
@@ -4801,5 +4802,37 @@ This is not allowed when the textlock is active:
48014802
- closing a window or quitting Vim
48024803
- etc.
48034804

4805+
==============================================================================
4806+
14. Vim script library *vim-script-library*
4807+
4808+
Vim comes bundled with a Vim script library, that can be used by runtime,
4809+
script authors. Currently, it only includes very few functions, but it may
4810+
grow over time.
4811+
4812+
The functions are available as |Vim9-script| as well as using legacy vim
4813+
script (to be used for non Vim 9.0 versions and Neovim).
4814+
4815+
*dist#vim* *dist#vim9*
4816+
The functions make use of the autoloaded prefix "dist#vim" (for legacy Vim script and
4817+
Neovim) and "dist#vim9" for Vim9 script.
4818+
4819+
The following functions are available:
4820+
4821+
dist#vim#IsSafeExecutable(filetype, executable) ~
4822+
dist#vim9#IsSafeExecutable(filetype:string, executable:string): bool ~
4823+
4824+
This function takes a filetype and an executable and checks whether it is safe
4825+
to execute the given executable. For security reasons users may not want to
4826+
have Vim execute random executables or may have forbidden to do so for
4827+
specific filetypes by setting the "<filetype>_exec" variable (|plugin_exec|).
4828+
4829+
It returns |true| or |false| to indicate whether the plugin should run the given
4830+
exectuable. It takes the following arguments:
4831+
4832+
argument type ~
4833+
4834+
filetype string
4835+
executable string
4836+
48044837

48054838
vim:tw=78:ts=8:noet:ft=help:norl:

0 commit comments

Comments
 (0)