diff --git a/doc/builtin.jax b/doc/builtin.jax index 4f68ec60b..9a020d8fd 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -1,4 +1,4 @@ -*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Nov 28 +*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Dec 11 VIM リファレンスマニュアル by Bram Moolenaar @@ -2726,6 +2726,7 @@ executable({expr}) *executable()* MS-Windowsではファイルが存在するかどうかだけを判定し、それが ディレクトリでないことや、それが本当に実行可能であるかどうかは 判定されない。 + MS-Windows では、Vim の実行可能ファイルと同じディレクトリにあ る実行可能ファイルは常に見つかる。このディレクトリは $PATH に 追加されているので、実行しても動作するはずだ |win32-PATH|。 @@ -2734,6 +2735,14 @@ executable({expr}) *executable()* 行可能ファイルも見つかるが、 $NoDefaultCurrentDirectoryInExePath 環境変数を設定することでこ れを無効にすることができる。 + *$NoDefaultCurrentDirectoryInExePath* + MS-Windows では、cmd.exe を 'shell' として使用する場合、通常、 + Vim のカレント作業ディレクトリにある実行可能ファイルも見つかる + が、これは `$NoDefaultCurrentDirectoryInExePath` 環境変数を設 + 定することで無効にすることができる。 + この変数はセキュリティ上の理由から、外部コマンド (|:!|、 + |:make|、|system()| 経由など) を実行するときに常に Vim によっ + て設定される。 戻り値は数値: 1 存在する @@ -2901,7 +2910,7 @@ exists({expr}) *exists()* |method| としても使用できる: > Varname()->exists() < - 戻り値の型: |String| + 戻り値の型: |Number| exists_compiled({expr}) *exists_compiled()* @@ -2918,7 +2927,7 @@ exists_compiled({expr}) *exists_compiled()* |:def| 関数の中で使える。 *E1233* 引数やローカル変数のチェックには機能しない。 - 戻り値の型: |String| + 戻り値の型: |Number| exp({expr}) *exp()* @@ -5293,10 +5302,13 @@ getwininfo([{winid}]) *getwininfo()* の場合は1 {Vimが|+quickfix|機能付きでコンパイル されたときのみ有効} + status_height ステータスラインの高さ (0 か 1) + tabnr タブページ番号 terminal 端末ウィンドウの場合は 1 {Vimが|+terminal|機能付きでコンパイル されたときのみ有効} - tabnr タブページ番号 + textoff テキストの前の'foldcolumn', + 'signcolumn', 行番号が占める列数 topline 最上に表示されたバッファ行 variables ウィンドウローカル変数の辞書への参照 width ウィンドウ幅 @@ -5304,8 +5316,6 @@ getwininfo([{winid}]) *getwininfo()* 1、そうでなければ 0 wincol ウィンドウの最も左のスクリーン列、 |win_screenpos()| の "col" - textoff テキストの前の'foldcolumn', - 'signcolumn', 行番号が占める列数 winid |window-ID| winnr ウィンドウ番号 winrow ウィンドウの最も上のスクリーン行、 @@ -8172,24 +8182,24 @@ printf({fmt}, {expr1} ...) *printf()* *E1502* [field-width] (または [precision]) 引数を再利用できる: > - echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2) + echo printf("%1$d at width %2$d is: %1$0*2$d", 1, 2) < 1 at width 2 is: 01 ただし、別の型として使用することはできない: > - echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2) + echo printf("%1$d at width %2$ld is: %1$0*2$d", 1, 2) < E1502: Positional argument 2 used as field width reused as different type: long int/int *E1503* 位置引数が使用されているが、正しい数値または引数が指定されてい ない場合、エラーが発生する: > - echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2) + echo printf("%1$d at width %2$d is: %1$0*2$.*3$d", 1, 2) < E1503: Positional argument 3 out of bounds: %1$d at width - %2$d is: %01$*2$.*3$d + %2$d is: %1$0*2$.*3$d 最初のエラーだけが報告される: > - echo printf("%01$*2$.*3$d %4$d", 1, 2) -< E1503: Positional argument 3 out of bounds: %01$*2$.*3$d + echo printf("%1$0*2$.*3$d %4$d", 1, 2) +< E1503: Positional argument 3 out of bounds: %1$0*2$.*3$d %4$d *E1504* diff --git a/en/builtin.txt b/en/builtin.txt index 90f873e1d..5b143cda8 100644 --- a/en/builtin.txt +++ b/en/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 28 +*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2711,13 +2711,18 @@ executable({expr}) *executable()* then the name is also tried without adding an extension. On MS-Windows it only checks if the file exists and is not a directory, not if it's really executable. + On MS-Windows an executable in the same directory as the Vim executable is always found. Since this directory is added to $PATH it should also work to execute it |win32-PATH|. - *NoDefaultCurrentDirectoryInExePath* - On MS-Windows an executable in Vim's current working directory - is also normally found, but this can be disabled by setting - the $NoDefaultCurrentDirectoryInExePath environment variable. + *$NoDefaultCurrentDirectoryInExePath* + On MS-Windows when using cmd.exe as 'shell' an executable in + Vim's current working directory is also normally found, which + can be disabled by setting the + `$NoDefaultCurrentDirectoryInExePath` environment variable. + This variable is always set by Vim when executing external + commands (e.g., via |:!|, |:make|, or |system()|) for security + reasons. The result is a Number: 1 exists @@ -2887,7 +2892,7 @@ exists({expr}) *exists()* Can also be used as a |method|: > Varname()->exists() < - Return type: |String| + Return type: |Number| exists_compiled({expr}) *exists_compiled()* @@ -2904,7 +2909,7 @@ exists_compiled({expr}) *exists_compiled()* Can only be used in a |:def| function. *E1233* This does not work to check for arguments or local variables. - Return type: |String| + Return type: |Number| exp({expr}) *exp()* @@ -5343,9 +5348,13 @@ getwininfo([{winid}]) *getwininfo()* {only with the +quickfix feature} quickfix 1 if quickfix or location list window {only with the +quickfix feature} + status_height status lines height (0 or 1) + tabnr tab page number terminal 1 if a terminal window {only with the +terminal feature} - tabnr tab page number + textoff number of columns occupied by any + 'foldcolumn', 'signcolumn' and line + number in front of the text topline first displayed buffer line variables a reference to the dictionary with window-local variables @@ -5354,9 +5363,6 @@ getwininfo([{winid}]) *getwininfo()* otherwise wincol leftmost screen column of the window; "col" from |win_screenpos()| - textoff number of columns occupied by any - 'foldcolumn', 'signcolumn' and line - number in front of the text winid |window-ID| winnr window number winrow topmost screen line of the window; @@ -8330,24 +8336,24 @@ printf({fmt}, {expr1} ...) *printf()* *E1502* You can re-use a [field-width] (or [precision]) argument: > - echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2) + echo printf("%1$d at width %2$d is: %1$0*2$d", 1, 2) < 1 at width 2 is: 01 However, you can't use it as a different type: > - echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2) + echo printf("%1$d at width %2$ld is: %1$0*2$d", 1, 2) < E1502: Positional argument 2 used as field width reused as different type: long int/int *E1503* When a positional argument is used, but not the correct number or arguments is given, an error is raised: > - echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2) + echo printf("%1$d at width %2$d is: %1$0*2$.*3$d", 1, 2) < E1503: Positional argument 3 out of bounds: %1$d at width - %2$d is: %01$*2$.*3$d + %2$d is: %1$0*2$.*3$d Only the first error is reported: > - echo printf("%01$*2$.*3$d %4$d", 1, 2) -< E1503: Positional argument 3 out of bounds: %01$*2$.*3$d + echo printf("%1$0*2$.*3$d %4$d", 1, 2) +< E1503: Positional argument 3 out of bounds: %1$0*2$.*3$d %4$d *E1504*