From 5a8a563c684933f1a057d03c0e760176a88ea9f5 Mon Sep 17 00:00:00 2001 From: h-east Date: Mon, 29 Sep 2025 20:01:03 +0900 Subject: [PATCH] Update {cmdline,helphelp,syntax,usr_05,usr_52}.{txt,jax} --- doc/cmdline.jax | 16 +++++++++------- doc/helphelp.jax | 7 +++++-- doc/syntax.jax | 5 ++--- doc/usr_05.jax | 3 ++- doc/usr_52.jax | 4 ++-- en/cmdline.txt | 16 +++++++++------- en/helphelp.txt | 7 +++++-- en/syntax.txt | 5 ++--- en/usr_05.txt | 3 ++- en/usr_52.txt | 4 ++-- 10 files changed, 40 insertions(+), 30 deletions(-) diff --git a/doc/cmdline.jax b/doc/cmdline.jax index 3d9eb0725..b696631b4 100644 --- a/doc/cmdline.jax +++ b/doc/cmdline.jax @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim バージョン 9.1. Last change: 2025 Sep 15 +*cmdline.txt* For Vim バージョン 9.1. Last change: 2025 Sep 24 VIMリファレンスマニュアル by Bram Moolenaar @@ -1095,7 +1095,7 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ :S シェルコマンドで利用できるように特別な文字をエスケープする。 (|shellescape()|を参照)。最後でなければならない。例: > :!dir :S - :call system('chmod +w -- ' . expand('%:S')) + :call system('chmod +w -- ' .. expand('%:S')) ファイル名が "src/version.c"、カレントディレクトリが "/home/mool/vim" のときの 例: > @@ -1358,12 +1358,14 @@ Note: これは |file-pattern| なので、"?" をエスケープする必要が set findfunc=Find func Find(arg, _) - if get(s:, 'filescache', []) == [] - let s:filescache = systemlist( - \ 'find . -path "*/.git" -prune -o -type f -print') + if empty(s:filescache) + let s:filescache = globpath('.', '**', 1, 1) + call filter(s:filescache, '!isdirectory(v:val)') + call map(s:filescache, "fnamemodify(v:val, ':.')") endif return a:arg == '' ? s:filescache : matchfuzzy(s:filescache, a:arg) endfunc + let s:filescache = [] autocmd CmdlineEnter : let s:filescache = [] `:Grep` コマンドは、パターンにマッチする行を検索し、入力すると結果を動的に更新 @@ -1374,8 +1376,8 @@ Note: これは |file-pattern| なので、"?" をエスケープする必要が \ Grep call VisitFile() func s:Grep(arglead, cmdline, cursorpos) - let cmd = $'grep -REIHns "{a:arglead}" --exclude-dir=.git - \ --exclude=".*"' + if match(&grepprg, '\$\*') == -1 | let &grepprg ..= ' $*' | endif + let cmd = substitute(&grepprg, '\$\*', shellescape(escape(a:arglead, '\')), '') return len(a:arglead) > 1 ? systemlist(cmd) : [] endfunc diff --git a/doc/helphelp.jax b/doc/helphelp.jax index 6c7d8efcb..59c834c4a 100644 --- a/doc/helphelp.jax +++ b/doc/helphelp.jax @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim バージョン 9.1. Last change: 2025 Sep 15 +*helphelp.txt* For Vim バージョン 9.1. Last change: 2025 Sep 27 VIMリファレンスマニュアル by Bram Moolenaar @@ -455,12 +455,14 @@ Ex コマンドのブロックを例示するときは、大なり記号 (>) を 末に書き、小なり記号 (<) をその後ろのブロックの前の最初の非空白文字として書き ます。テキストが 1 列目から始まっている行があると、Ex コマンドのブロックはその 直前で暗黙的に終了となります。例: > + function Example_Func() echo "Example" endfunction < コードブロックの構文ハイライトを有効にするには、大なり記号 (>) の後に言語名の 注釈 (例: "vim") を配置します。例: >vim + function Example_Func() echo "Example" endfunction @@ -468,7 +470,8 @@ Ex コマンドのブロックを例示するときは、大なり記号 (>) を *g:help_example_languages* デフォルトでは、ヘルプファイルは Vim script のハイライトのみをサポートします。 他の言語の構文ハイライトが必要な場合は、|vimrc| に以下を追加してください: > - :let g:help_example_languages = { "vim": "vim", "sh": "bash" } + :let g:help_example_languages = { + \ "vim": "vim", "vim9": "vim", "bash": "sh" } キーは注釈マーカー名を表し、値は 'syntax' 名です。 Note: "g:help_example_languages" に "vim" を含めない場合、"vim" の構文ハイライ diff --git a/doc/syntax.jax b/doc/syntax.jax index cacb6f5b8..2967dce9e 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -1,4 +1,4 @@ -*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Sep 16 +*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Sep 28 VIMリファレンスマニュアル by Bram Moolenaar @@ -2212,12 +2212,11 @@ Java プラットフォームへの重要な変更は、リリース用に実装 に対応するため Vim には実装されている構文関連のプレビュー機能に対するオプショ ンのサポートがある。以下のようにプレビュー機能番号のリストを指定して、これをリ クエストできる: > - :let g:java_syntax_previews = [488, 494] + :let g:java_syntax_previews = [488] サポートされている JEP 番号は以下の表から取得される: `430`: String Templates [JDK 21] `488`: Primitive types in Patterns, instanceof, and switch - `494`: Module Import Declarations Note 特定のプレビュー機能が Java プラットフォームに統合されると、すぐにそのエ ントリはテーブルから削除され、関連するオプション機能は廃止されることに注意。 diff --git a/doc/usr_05.jax b/doc/usr_05.jax index c976bce28..d5ed81765 100644 --- a/doc/usr_05.jax +++ b/doc/usr_05.jax @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim バージョン 9.1. Last change: 2025 Apr 10 +*usr_05.txt* For Vim バージョン 9.1. Last change: 2025 Sep 27 VIM USER MANUAL - by Bram Moolenaar @@ -315,6 +315,7 @@ CTRL-U でアンドゥすることができます。":iunmap " で元に戻 *restore-cursor* *last-position-jump* >vim + augroup RestoreCursor autocmd! autocmd BufReadPost * diff --git a/doc/usr_52.jax b/doc/usr_52.jax index b322a0f58..1bba21191 100644 --- a/doc/usr_52.jax +++ b/doc/usr_52.jax @@ -1,4 +1,4 @@ -*usr_52.txt* For Vim バージョン 9.1. Last change: 2025 Mar 17 +*usr_52.txt* For Vim バージョン 9.1. Last change: 2025 Sep 27 VIM USER MANUAL - by Bram Moolenaar @@ -352,7 +352,7 @@ $VIMRUNTIME/pack/dist/opt/comment/ にあるパッケージを確認してくだ ☆highlight-yank プラグイン Vim には、Vim9 script で記述された highlight-yank プラグインが付属しています。 -|hlyank-install|。以下は簡略化された実装です: >vim +|hlyank-install|。以下は簡略化された実装です: >vim9 vim9script diff --git a/en/cmdline.txt b/en/cmdline.txt index e6f2d146f..2781f8a45 100644 --- a/en/cmdline.txt +++ b/en/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 9.1. Last change: 2025 Sep 15 +*cmdline.txt* For Vim version 9.1. Last change: 2025 Sep 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1161,7 +1161,7 @@ These modifiers can be given, in this order: :S Escape special characters for use with a shell command (see |shellescape()|). Must be the last one. Examples: > :!dir :S - :call system('chmod +w -- ' . expand('%:S')) + :call system('chmod +w -- ' .. expand('%:S')) Examples, when the file name is "src/version.c", current dir "/home/mool/vim": > @@ -1425,12 +1425,14 @@ file picker: > set findfunc=Find func Find(arg, _) - if get(s:, 'filescache', []) == [] - let s:filescache = systemlist( - \ 'find . -path "*/.git" -prune -o -type f -print') + if empty(s:filescache) + let s:filescache = globpath('.', '**', 1, 1) + call filter(s:filescache, '!isdirectory(v:val)') + call map(s:filescache, "fnamemodify(v:val, ':.')") endif return a:arg == '' ? s:filescache : matchfuzzy(s:filescache, a:arg) endfunc + let s:filescache = [] autocmd CmdlineEnter : let s:filescache = [] The `:Grep` command searches for lines matching a pattern and updates the @@ -1441,8 +1443,8 @@ the `CmdlineLeavePre` autocmd from the next section): > \ Grep call VisitFile() func s:Grep(arglead, cmdline, cursorpos) - let cmd = $'grep -REIHns "{a:arglead}" --exclude-dir=.git - \ --exclude=".*"' + if match(&grepprg, '\$\*') == -1 | let &grepprg ..= ' $*' | endif + let cmd = substitute(&grepprg, '\$\*', shellescape(escape(a:arglead, '\')), '') return len(a:arglead) > 1 ? systemlist(cmd) : [] endfunc diff --git a/en/helphelp.txt b/en/helphelp.txt index ef70be770..ac57264b8 100644 --- a/en/helphelp.txt +++ b/en/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 9.1. Last change: 2025 Sep 15 +*helphelp.txt* For Vim version 9.1. Last change: 2025 Sep 27 VIM REFERENCE MANUAL by Bram Moolenaar @@ -463,12 +463,14 @@ To quote a block of ex-commands verbatim, place a greater than (>) character at the end of the line before the block and a less than (<) character as the first non-blank on a line following the block. Any line starting in column 1 also implicitly stops the block of ex-commands before it. E.g. > + function Example_Func() echo "Example" endfunction < To enable syntax highlighting for a block of code, place a language name annotation (e.g. "vim") after a greater than (>) character. E.g. >vim + function Example_Func() echo "Example" endfunction @@ -476,7 +478,8 @@ annotation (e.g. "vim") after a greater than (>) character. E.g. >vim *g:help_example_languages* By default, help files only support Vim script highlighting. If you need syntax highlighting for other languages, add to your |vimrc|: > - :let g:help_example_languages = { "vim": "vim", "sh": "bash" } + :let g:help_example_languages = { + \ "vim": "vim", "vim9": "vim", "bash": "sh" } The key represents the annotation marker name, and the value is the 'syntax' name. diff --git a/en/syntax.txt b/en/syntax.txt index cde13c064..8f10398c2 100644 --- a/en/syntax.txt +++ b/en/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2025 Sep 16 +*syntax.txt* For Vim version 9.1. Last change: 2025 Sep 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2272,12 +2272,11 @@ cycles for such a feature to become either integrated into the platform or withdrawn from this effort. To cater for early adopters, there is optional support in Vim for syntax related preview features that are implemented. You can request it by specifying a list of preview feature numbers as follows: > - :let g:java_syntax_previews = [488, 494] + :let g:java_syntax_previews = [488] The supported JEP numbers are to be drawn from this table: `430`: String Templates [JDK 21] `488`: Primitive types in Patterns, instanceof, and switch - `494`: Module Import Declarations Note that as soon as the particular preview feature will have been integrated into the Java platform, its entry will be removed from the table and related diff --git a/en/usr_05.txt b/en/usr_05.txt index fea6cddd1..5b52bc654 100644 --- a/en/usr_05.txt +++ b/en/usr_05.txt @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim version 9.1. Last change: 2025 Apr 10 +*usr_05.txt* For Vim version 9.1. Last change: 2025 Sep 27 VIM USER MANUAL - by Bram Moolenaar @@ -308,6 +308,7 @@ This switches on three very clever mechanisms: *restore-cursor* *last-position-jump* >vim + augroup RestoreCursor autocmd! autocmd BufReadPost * diff --git a/en/usr_52.txt b/en/usr_52.txt index 19a37dca5..906683811 100644 --- a/en/usr_52.txt +++ b/en/usr_52.txt @@ -1,4 +1,4 @@ -*usr_52.txt* For Vim version 9.1. Last change: 2025 Mar 17 +*usr_52.txt* For Vim version 9.1. Last change: 2025 Sep 27 VIM USER MANUAL - by Bram Moolenaar @@ -347,7 +347,7 @@ Have a look at the package located at $VIMRUNTIME/pack/dist/opt/comment/ HIGHLIGHT YANK PLUGIN Vim comes with the highlight-yank plugin, written in Vim9 script -|hlyank-install|, here is a simplified implementation: >vim +|hlyank-install|, here is a simplified implementation: >vim9 vim9script