diff --git a/doc/autocmd.jax b/doc/autocmd.jax index dd605a5d5..15fe4d470 100644 --- a/doc/autocmd.jax +++ b/doc/autocmd.jax @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Sep 02 +*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Sep 11 VIMリファレンスマニュアル by Bram Moolenaar @@ -1603,9 +1603,11 @@ Note: パスの途中だけにマッチさせ、ルートディレクトリに [ch] は 'c' または 'h' にマッチ [^ch] は 'c' と 'h' 以外の文字にマッチ -'/' という文字は、全てのシステムでパスの区切り文字に使われることに注意すること +Note '/' という文字は、全てのシステムでパスの区切り文字に使われることに注意 (MS-Windowsでさえも)。これは、パターン内でバックスラッシュを使うことが難しい上 -に、別々のシステムでも自動コマンドが動作するようにするためである。 +に、別々のシステムでも自動コマンドが動作するようにするためである。すべてのプ +ラットフォームで '/' のみに一致させる (例えば、ファイル以外のパターンの場合) +には、"\/" を使用する。 |pattern| を使うことができる。上記の翻訳が行われているため、期待通りに機能しな い可能性がある。 diff --git a/en/autocmd.txt b/en/autocmd.txt index 66e94b0b8..490ad4456 100644 --- a/en/autocmd.txt +++ b/en/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2025 Sep 02 +*autocmd.txt* For Vim version 9.1. Last change: 2025 Sep 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1629,7 +1629,8 @@ The pattern is interpreted like mostly used in file names: Note that for all systems the '/' character is used for path separator (even for MS-Windows). This was done because the backslash is difficult to use in a -pattern and to make the autocommands portable across different systems. +pattern and to make the autocommands portable across different systems. To +only match a '/' on all platforms (e.g. in a non-file pattern), use "\/". It is possible to use |pattern| items, but they may not work as expected, because of the translation done for the above.