Skip to content

Commit 68fcafe

Browse files
authored
Merge pull request #2331 from h-east/update-several-files-2
Update {cmdline,helphelp,syntax,usr_05,usr_52}.{txt,jax}
2 parents dda7b74 + 5a8a563 commit 68fcafe

File tree

10 files changed

+40
-30
lines changed

10 files changed

+40
-30
lines changed

doc/cmdline.jax

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim バージョン 9.1. Last change: 2025 Sep 15
1+
*cmdline.txt* For Vim バージョン 9.1. Last change: 2025 Sep 24
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -1095,7 +1095,7 @@ Note: これらは文字通りに打ち込まれる、これらは特別なキ
10951095
:S シェルコマンドで利用できるように特別な文字をエスケープする。
10961096
(|shellescape()|を参照)。最後でなければならない。例: >
10971097
:!dir <cfile>:S
1098-
:call system('chmod +w -- ' . expand('%:S'))
1098+
:call system('chmod +w -- ' .. expand('%:S'))
10991099
11001100
ファイル名が "src/version.c"、カレントディレクトリが "/home/mool/vim" のときの
11011101
例: >
@@ -1358,12 +1358,14 @@ Note: これは |file-pattern| なので、"?" をエスケープする必要が
13581358
13591359
set findfunc=Find
13601360
func Find(arg, _)
1361-
if get(s:, 'filescache', []) == []
1362-
let s:filescache = systemlist(
1363-
\ 'find . -path "*/.git" -prune -o -type f -print')
1361+
if empty(s:filescache)
1362+
let s:filescache = globpath('.', '**', 1, 1)
1363+
call filter(s:filescache, '!isdirectory(v:val)')
1364+
call map(s:filescache, "fnamemodify(v:val, ':.')")
13641365
endif
13651366
return a:arg == '' ? s:filescache : matchfuzzy(s:filescache, a:arg)
13661367
endfunc
1368+
let s:filescache = []
13671369
autocmd CmdlineEnter : let s:filescache = []
13681370
13691371
`:Grep` コマンドは、パターンにマッチする行を検索し、入力すると結果を動的に更新
@@ -1374,8 +1376,8 @@ Note: これは |file-pattern| なので、"?" をエスケープする必要が
13741376
\ Grep call <SID>VisitFile()
13751377
13761378
func s:Grep(arglead, cmdline, cursorpos)
1377-
let cmd = $'grep -REIHns "{a:arglead}" --exclude-dir=.git
1378-
\ --exclude=".*"'
1379+
if match(&grepprg, '\$\*') == -1 | let &grepprg ..= ' $*' | endif
1380+
let cmd = substitute(&grepprg, '\$\*', shellescape(escape(a:arglead, '\')), '')
13791381
return len(a:arglead) > 1 ? systemlist(cmd) : []
13801382
endfunc
13811383

doc/helphelp.jax

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*helphelp.txt* For Vim バージョン 9.1. Last change: 2025 Sep 15
1+
*helphelp.txt* For Vim バージョン 9.1. Last change: 2025 Sep 27
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -455,20 +455,23 @@ Ex コマンドのブロックを例示するときは、大なり記号 (>) を
455455
末に書き、小なり記号 (<) をその後ろのブロックの前の最初の非空白文字として書き
456456
ます。テキストが 1 列目から始まっている行があると、Ex コマンドのブロックはその
457457
直前で暗黙的に終了となります。例: >
458+
458459
function Example_Func()
459460
echo "Example"
460461
endfunction
461462
<
462463
コードブロックの構文ハイライトを有効にするには、大なり記号 (>) の後に言語名の
463464
注釈 (例: "vim") を配置します。例: >vim
465+
464466
function Example_Func()
465467
echo "Example"
466468
endfunction
467469
<
468470
*g:help_example_languages*
469471
デフォルトでは、ヘルプファイルは Vim script のハイライトのみをサポートします。
470472
他の言語の構文ハイライトが必要な場合は、|vimrc| に以下を追加してください: >
471-
:let g:help_example_languages = { "vim": "vim", "sh": "bash" }
473+
:let g:help_example_languages = {
474+
\ "vim": "vim", "vim9": "vim", "bash": "sh" }
472475
キーは注釈マーカー名を表し、値は 'syntax' 名です。
473476

474477
Note: "g:help_example_languages" に "vim" を含めない場合、"vim" の構文ハイライ

doc/syntax.jax

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Sep 16
1+
*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Sep 28
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -2212,12 +2212,11 @@ Java プラットフォームへの重要な変更は、リリース用に実装
22122212
に対応するため Vim には実装されている構文関連のプレビュー機能に対するオプショ
22132213
ンのサポートがある。以下のようにプレビュー機能番号のリストを指定して、これをリ
22142214
クエストできる: >
2215-
:let g:java_syntax_previews = [488, 494]
2215+
:let g:java_syntax_previews = [488]
22162216
22172217
サポートされている JEP 番号は以下の表から取得される:
22182218
`430`: String Templates [JDK 21]
22192219
`488`: Primitive types in Patterns, instanceof, and switch
2220-
`494`: Module Import Declarations
22212220

22222221
Note 特定のプレビュー機能が Java プラットフォームに統合されると、すぐにそのエ
22232222
ントリはテーブルから削除され、関連するオプション機能は廃止されることに注意。

doc/usr_05.jax

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*usr_05.txt* For Vim バージョン 9.1. Last change: 2025 Apr 10
1+
*usr_05.txt* For Vim バージョン 9.1. Last change: 2025 Sep 27
22

33
VIM USER MANUAL - by Bram Moolenaar
44

@@ -315,6 +315,7 @@ CTRL-U でアンドゥすることができます。":iunmap <C-U>" で元に戻
315315

316316

317317
*restore-cursor* *last-position-jump* >vim
318+
318319
augroup RestoreCursor
319320
autocmd!
320321
autocmd BufReadPost *

doc/usr_52.jax

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*usr_52.txt* For Vim バージョン 9.1. Last change: 2025 Mar 17
1+
*usr_52.txt* For Vim バージョン 9.1. Last change: 2025 Sep 27
22

33
VIM USER MANUAL - by Bram Moolenaar
44

@@ -352,7 +352,7 @@ $VIMRUNTIME/pack/dist/opt/comment/ にあるパッケージを確認してくだ
352352
☆highlight-yank プラグイン
353353

354354
Vim には、Vim9 script で記述された highlight-yank プラグインが付属しています。
355-
|hlyank-install|。以下は簡略化された実装です: >vim
355+
|hlyank-install|。以下は簡略化された実装です: >vim9
356356

357357
vim9script
358358

en/cmdline.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim version 9.1. Last change: 2025 Sep 15
1+
*cmdline.txt* For Vim version 9.1. Last change: 2025 Sep 24
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1161,7 +1161,7 @@ These modifiers can be given, in this order:
11611161
:S Escape special characters for use with a shell command (see
11621162
|shellescape()|). Must be the last one. Examples: >
11631163
:!dir <cfile>:S
1164-
:call system('chmod +w -- ' . expand('%:S'))
1164+
:call system('chmod +w -- ' .. expand('%:S'))
11651165
11661166
Examples, when the file name is "src/version.c", current dir
11671167
"/home/mool/vim": >
@@ -1425,12 +1425,14 @@ file picker: >
14251425
14261426
set findfunc=Find
14271427
func Find(arg, _)
1428-
if get(s:, 'filescache', []) == []
1429-
let s:filescache = systemlist(
1430-
\ 'find . -path "*/.git" -prune -o -type f -print')
1428+
if empty(s:filescache)
1429+
let s:filescache = globpath('.', '**', 1, 1)
1430+
call filter(s:filescache, '!isdirectory(v:val)')
1431+
call map(s:filescache, "fnamemodify(v:val, ':.')")
14311432
endif
14321433
return a:arg == '' ? s:filescache : matchfuzzy(s:filescache, a:arg)
14331434
endfunc
1435+
let s:filescache = []
14341436
autocmd CmdlineEnter : let s:filescache = []
14351437
14361438
The `:Grep` command searches for lines matching a pattern and updates the
@@ -1441,8 +1443,8 @@ the `CmdlineLeavePre` autocmd from the next section): >
14411443
\ Grep call <SID>VisitFile()
14421444
14431445
func s:Grep(arglead, cmdline, cursorpos)
1444-
let cmd = $'grep -REIHns "{a:arglead}" --exclude-dir=.git
1445-
\ --exclude=".*"'
1446+
if match(&grepprg, '\$\*') == -1 | let &grepprg ..= ' $*' | endif
1447+
let cmd = substitute(&grepprg, '\$\*', shellescape(escape(a:arglead, '\')), '')
14461448
return len(a:arglead) > 1 ? systemlist(cmd) : []
14471449
endfunc
14481450

en/helphelp.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*helphelp.txt* For Vim version 9.1. Last change: 2025 Sep 15
1+
*helphelp.txt* For Vim version 9.1. Last change: 2025 Sep 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -463,20 +463,23 @@ To quote a block of ex-commands verbatim, place a greater than (>) character
463463
at the end of the line before the block and a less than (<) character as the
464464
first non-blank on a line following the block. Any line starting in column 1
465465
also implicitly stops the block of ex-commands before it. E.g. >
466+
466467
function Example_Func()
467468
echo "Example"
468469
endfunction
469470
<
470471
To enable syntax highlighting for a block of code, place a language name
471472
annotation (e.g. "vim") after a greater than (>) character. E.g. >vim
473+
472474
function Example_Func()
473475
echo "Example"
474476
endfunction
475477
<
476478
*g:help_example_languages*
477479
By default, help files only support Vim script highlighting. If you need
478480
syntax highlighting for other languages, add to your |vimrc|: >
479-
:let g:help_example_languages = { "vim": "vim", "sh": "bash" }
481+
:let g:help_example_languages = {
482+
\ "vim": "vim", "vim9": "vim", "bash": "sh" }
480483
The key represents the annotation marker name, and the value is the 'syntax'
481484
name.
482485

en/syntax.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 9.1. Last change: 2025 Sep 16
1+
*syntax.txt* For Vim version 9.1. Last change: 2025 Sep 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2272,12 +2272,11 @@ cycles for such a feature to become either integrated into the platform or
22722272
withdrawn from this effort. To cater for early adopters, there is optional
22732273
support in Vim for syntax related preview features that are implemented. You
22742274
can request it by specifying a list of preview feature numbers as follows: >
2275-
:let g:java_syntax_previews = [488, 494]
2275+
:let g:java_syntax_previews = [488]
22762276
22772277
The supported JEP numbers are to be drawn from this table:
22782278
`430`: String Templates [JDK 21]
22792279
`488`: Primitive types in Patterns, instanceof, and switch
2280-
`494`: Module Import Declarations
22812280

22822281
Note that as soon as the particular preview feature will have been integrated
22832282
into the Java platform, its entry will be removed from the table and related

en/usr_05.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*usr_05.txt* For Vim version 9.1. Last change: 2025 Apr 10
1+
*usr_05.txt* For Vim version 9.1. Last change: 2025 Sep 27
22

33
VIM USER MANUAL - by Bram Moolenaar
44

@@ -308,6 +308,7 @@ This switches on three very clever mechanisms:
308308

309309

310310
*restore-cursor* *last-position-jump* >vim
311+
311312
augroup RestoreCursor
312313
autocmd!
313314
autocmd BufReadPost *

en/usr_52.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*usr_52.txt* For Vim version 9.1. Last change: 2025 Mar 17
1+
*usr_52.txt* For Vim version 9.1. Last change: 2025 Sep 27
22

33
VIM USER MANUAL - by Bram Moolenaar
44

@@ -347,7 +347,7 @@ Have a look at the package located at $VIMRUNTIME/pack/dist/opt/comment/
347347
HIGHLIGHT YANK PLUGIN
348348

349349
Vim comes with the highlight-yank plugin, written in Vim9 script
350-
|hlyank-install|, here is a simplified implementation: >vim
350+
|hlyank-install|, here is a simplified implementation: >vim9
351351

352352
vim9script
353353

0 commit comments

Comments
 (0)