diff --git a/doc/eval.jax b/doc/eval.jax index 537bebe86..c47eaf605 100644 --- a/doc/eval.jax +++ b/doc/eval.jax @@ -1,4 +1,4 @@ -*eval.txt* For Vim バージョン 9.1. Last change: 2025 Jan 25 +*eval.txt* For Vim バージョン 9.1. Last change: 2025 Jan 29 VIMリファレンスマニュアル by Bram Moolenaar @@ -4765,13 +4765,25 @@ dist#vim9#IsSafeExecutable(filetype:string, executable:string): bool ~ executable string *dist#vim9#Open()* *:Open* - *g:Openprg* + *g:Openprg* *gx* dist#vim9#Open(file: string) ~ システムのデフォルトハンドラー (macOS の `open`、Windows の `explorer.exe`、 Linux の `xdg-open` 等) を使用して `path` を開く。変数 |g:Openprg| が存在する 場合は、代わりに変数で指定された文字列が使用される。 +この関数は、デフォルトでは gx マッピングを使用して呼び出される。ビジュアルモー +ドでは、視覚的に選択されたテキストを開こうとする。 + +関連設定変数: +`g:gx_word`: gx がカーソルの下のテキストを取得する方法を制御する。下位互換性の + ために、`g:netrw_gx` をフォールバックとして使用する。(デフォルト: + ``) + +`g:nogx`: gx マッピングを無効にする。下位互換性のために `g:netrw_nogx` をフォー + ルバックとして使用する。(デフォルト: `unset`) + + NOTE: パスのエスケープは自動的に適用される。 使用法: >vim diff --git a/en/eval.txt b/en/eval.txt index 094b650c7..0851aa5c3 100644 --- a/en/eval.txt +++ b/en/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.1. Last change: 2025 Jan 25 +*eval.txt* For Vim version 9.1. Last change: 2025 Jan 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4908,13 +4908,25 @@ executable. It takes the following arguments: executable string *dist#vim9#Open()* *:Open* - *g:Openprg* + *g:Openprg* *gx* dist#vim9#Open(file: string) ~ Opens `path` with the system default handler (macOS `open`, Windows `explorer.exe`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the string specified in the variable is used instead. +This function is by default called using the gx mapping. In visual mode +tries to open the visually selected text. + +Associated setting variables: +`g:gx_word`: control how gx picks up the text under the cursor. Uses + `g:netrw_gx` as a fallback for backward compatibility. + (default: ``) + +`g:nogx`: disables the gx mapping. Uses `g:netrw_nogx` as a fallback for + backward compatibility. (default: `unset`) + + NOTE: Escaping of the path is automatically applied. Usage: >vim