Skip to content

Commit 8223f34

Browse files
authored
Merge pull request #1556 from vim-jp/hh-updtate-syntax
Update syntax.{txt,jax}
2 parents 7698333 + e0d8400 commit 8223f34

File tree

2 files changed

+158
-35
lines changed

2 files changed

+158
-35
lines changed

doc/syntax.jax

Lines changed: 79 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim バージョン 9.1. Last change: 2024 Apr 09
1+
*syntax.txt* For Vim バージョン 9.1. Last change: 2024 May 31
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -903,8 +903,25 @@ nasm_loose_syntax 非オフィシャルな拡張構文をエラーとしない
903903
nasm_ctx_outside_macro マクロ外のコンテキストをエラーとしない
904904
nasm_no_warn 潜在的に危険な構文をToDoとしてハイライトしない
905905

906+
ASTRO *astro.vim* *ft-astro-syntax*
906907

907-
ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax*
908+
コンフィグレーション
909+
910+
以下の変数は、特定の構文ハイライト機能を制御する。
911+
これらを .vimrc に追加できる: >
912+
let g:astro_typescript = "enable"
913+
<
914+
".astro" ファイルで TypeScript と TSX を有効にする。デフォルト値: "disable" >
915+
let g:astro_stylus = "enable"
916+
<
917+
".astro" ファイルでスタイラスを有効にする。デフォルト値: "disable"
918+
919+
NOTE: astro ファイルでスタイラスをサポートするには、外部プラグインをインストー
920+
ルする必要がある。
921+
922+
923+
ASPPERL *ft-aspperl-syntax*
924+
ASPVBS *ft-aspvbs-syntax*
908925

909926
*.aspと*.asaという名のファイルはどちらもPerlもしくはVisual Basicのスクリプトた
910927
りえる。Vimにとってこれを判別するのは難しいので、グローバル変数を設定すること
@@ -1431,9 +1448,10 @@ Euphoria には二つの構文強調表示ファイルがある。一つは Euph
14311448
3.1.1 用で、デフォルトではこれが使われる。もう一つは Euphoria 4.0.5 以降用であ
14321449
る。
14331450

1434-
Euphoria バージョン 3.1.1 (http://www.rapideuphoria.com/) は DOS プラット
1435-
フォームのアプリケーションの開発にまだ必要とされている。Euphoria バージョン 4
1436-
(http://www.openeuphoria.org/) はそれをサポートしていない。
1451+
Euphoria バージョン 3.1.1 (http://www.rapideuphoria.com/ リンク切れのようだ)
1452+
は DOS プラットフォームのアプリケーションの開発にまだ必要とされている。
1453+
Euphoria バージョン 4 (http://www.openeuphoria.org/) はそれをサポートしていな
1454+
い。
14371455

14381456
以下の拡張子のファイルは自動的に Euphoria ファイルタイプとして認識される:
14391457

@@ -1489,8 +1507,8 @@ Elixir と Euphoria はファイル拡張子 *.ex を共有している。g:file
14891507
FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax*
14901508

14911509

1492-
FlexWiki は http://www.flexwiki.com で入手できる ASP.NET ベースの wiki パッ
1493-
ケージである
1510+
FlexWiki はASP.NET ベースの wiki パッケージで、以前は
1511+
http://www.flexwiki.com で入手できた
14941512
NOTE: このサイトは現在機能していない。Wikipedia によると 2009 年に開発がストッ
14951513
プした。
14961514

@@ -1935,17 +1953,25 @@ java.ioなど特定のパッケージの識別子だけをハイライトした
19351953
関数を認識する方法はJavaコードの書き方に依存するため、関数名はハイライトされな
19361954
い。構文ファイルは関数をハイライトする方法を2つ備えている:
19371955

1938-
関数宣言が常にタブ、スペース8個、スペース2個のいずれかでインデントされているな
1939-
>
1956+
関数宣言をタブ、または、8 つまでのスペース文字で一貫してインデントして記述す
1957+
る場合は、以下のように設定する >
19401958
:let java_highlight_functions="indent"
1941-
とするとよいかもしれない。
1942-
しかし、関数とクラスの命名(大文字・小文字についての)に関するJavaガイドラインに
1943-
したがっているなら >
1959+
:let java_highlight_functions="indent1"
1960+
:let java_highlight_functions="indent2"
1961+
:let java_highlight_functions="indent3"
1962+
:let java_highlight_functions="indent4"
1963+
:let java_highlight_functions="indent5"
1964+
:let java_highlight_functions="indent6"
1965+
:let java_highlight_functions="indent7"
1966+
:let java_highlight_functions="indent8"
1967+
Note 'shiftwidth' に関しては、これがインデントの一番左のステップであることに注
1968+
意すること。
1969+
ただし、関数とクラスの命名方法 (大文字と小文字を考慮) に関する Java ガイドライ
1970+
ンに従っていて、インデントがある場合は、以下のように設定することをお勧めする >
19441971
:let java_highlight_functions="style"
1945-
とすること。
1946-
もしどちらのオプションもだめで、それでも関数宣言をハイライトしたいなら、
1947-
java.vim中の定義を変更するか、もとのjava.vimに関数をハイライトするコードを加え
1948-
て自分用のjava.vimを作るかして独自の定義を作るしかない。
1972+
どちらの設定もうまくいかないが、それでも関数宣言をハイライトしたい場合は、
1973+
java.vim の定義を変更するか、元の定義を組み込んだ独自の java.vim を作成してか
1974+
ら関数をハイライトするコードを追加して、独自の定義を作成すること。
19491975

19501976
Java 1.1では、System.out.println()とSystem.err.println()はデバッグのためだけに
19511977
使われるものだった。そのためデバッグ用の文を区別してハイライトすることができ
@@ -2004,6 +2030,15 @@ json構文ファイルは、標準で conceal サポート付きのシンタッ
20042030
let g:vim_json_warning = 0
20052031
20062032
2033+
JQ *jq.vim* *jq_quote_highlight* *ft-jq-syntax*
2034+
2035+
数字に独自の色を付けないようにするには、vimrc に以下のコードを追加する: >
2036+
hi link jqNumber Normal
2037+
2038+
引用符を文字列とは異なるハイライトにしたい場合は >
2039+
let g:jq_quote_highlight = 1
2040+
2041+
20072042
LACE *lace.vim* *ft-lace-syntax*
20082043

20092044
Lace (Language for Assembly of Classes in Eiffel)は大文字・小文字を無視する。
@@ -2585,8 +2620,8 @@ perl用の構文ハイライトにはたくさんのオプションがある。
25852620
シンクロナイズには3つのオプションがある。最初の2つは、シンクロナイズのトリガー
25862621
の一部をオフにするもので、ハイライトが適切に機能しないときのみ必要になる。スク
25872622
ロール中に突然スクリーン全体の色がすっかり変わってしまったらこれらのうち1つを
2588-
オフにしてみること。その誤りを引き起こした行を特定できるなら、それを知らせてく
2589-
ださい
2623+
オフにしてみること。その誤りを引き起こした行を特定できる場合、それを開発者に知
2624+
らせてください
25902625

25912626
1つのトリガーは "^\s*sub\s*" に関するもので、もう1つはほぼ "^[$@%]" に関するも
25922627
のである。 >
@@ -2914,6 +2949,13 @@ knitrチャンクヘッダー内のRコードをハイライトするには、|v
29142949
let rrst_syn_hl_chunk = 1
29152950
29162951
2952+
RASI *rasi.vim* *ft-rasi-syntax*
2953+
2954+
Rasi は Rofi Advanced Style Information の略である。これは、検索ウィンドウのレ
2955+
ンダリングをスタイル設定するために、プログラム rofi によって使用される。この言
2956+
語は、CSS スタイルシートに大きく影響を受けている。次の拡張子を持つファイルは、
2957+
rasi ファイルとして認識される: .rasi。
2958+
29172959
READLINE *readline.vim* *ft-readline-syntax*
29182960

29192961
readlineライブラリは主としてBASHシェルで使われ、BASHはかなりの数のコマンドとオ
@@ -3611,6 +3653,19 @@ tfの構文ハイライトには1つのオプションがある。
36113653
36123654
:let tf_minlines = your choice
36133655
<
3656+
TYPESCRIPT *typescript.vim* *ft-typescript-syntax*
3657+
*typescriptreact.vim* *ft-typescriptreact-syntax*
3658+
3659+
TypeScript 構文のハイライトを制御する 1 つのオプションがある。
3660+
3661+
*g:typescript_host_keyword*
3662+
この変数を 1 に設定すると、`addEventListener` などのホスト固有の API がハイラ
3663+
イトされる。無効にするには、.vimrc で 0 に設定する: >
3664+
3665+
let g:typescript_host_keyword = 0
3666+
<
3667+
デフォルト値は 1 である。
3668+
36143669
VIM *vim.vim* *ft-vim-syntax*
36153670
*g:vimsyn_minlines* *g:vimsyn_maxlines*
36163671
正確な構文ハイライトと画面更新速度はトレードオフの問題である。正確さを向上させ
@@ -3644,12 +3699,15 @@ syntax/vim.vim によって折り畳みが可能である: >
36443699
g:vimsyn_folding == 0 または変数が存在しない: 構文ベースの折り畳みはしない
36453700
g:vimsyn_folding =~ 'a' : augroups
36463701
g:vimsyn_folding =~ 'f' : 関数を折り畳む
3702+
g:vimsyn_folding =~ 'h' : heredoc を折り畳む
3703+
g:vimsyn_folding =~ 'H' : Vim9-script の旧来のヘッダーを折り畳む
36473704
g:vimsyn_folding =~ 'l' : lua スクリプトを折り畳む
36483705
g:vimsyn_folding =~ 'm' : mzscheme スクリプトを折り畳む
36493706
g:vimsyn_folding =~ 'p' : perl スクリプトを折り畳む
36503707
g:vimsyn_folding =~ 'P' : python スクリプトを折り畳む
36513708
g:vimsyn_folding =~ 'r' : ruby スクリプトを折り畳む
36523709
g:vimsyn_folding =~ 't' : tcl スクリプトを折り畳む
3710+
let g:vimsyn_folding = 'acfhlmpPrt'
36533711
<
36543712
*g:vimsyn_noerror*
36553713
syntax/vim.vimによるエラーのハイライトは必ずしも正しいとは限らない。Vim script
@@ -4160,14 +4218,16 @@ conceal *conceal* *:syn-conceal*
41604218
際に Conceal 表示されるかどうかは 'conceallevel' オプションの設定に依存する。
41614219
現在行のアイテムを Conceal 表示するかどうかは 'concealcursor' オプションで制御
41624220
できる (行の編集を妨げないようにするため)。
4163-
もう一つの方法として|matchadd()|を用いても、テキストを隠すことができる。
4221+
テキストを隠す別の方法は |matchadd()| を使用することだが、内部的には少し異なる
4222+
動作をする。|syntax-vs-match|
41644223

41654224
concealends *:syn-concealends*
41664225

41674226
"concealends" 引数が指定されると、リージョンの開始部分と終了部分が Conceal 可
41684227
能になる (リージョンの中身はならない)。アイテムが実際に Conceal 表示されるかど
41694228
うかは 'conceallevel' の設定に依存する。"matchgroup" で別のハイライトを設定す
41704229
ることでリージョンの終了部分だけを別に Conceal 表示するということもできる。
4230+
|synconcealed()| 関数を使用すると、conceal された項目に関する情報を取得できる。
41714231

41724232
cchar *:syn-cchar*
41734233
*E844*

en/syntax.txt

Lines changed: 79 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 9.1. Last change: 2024 Apr 09
1+
*syntax.txt* For Vim version 9.1. Last change: 2024 May 31
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -930,8 +930,24 @@ nasm_loose_syntax unofficial parser allowed syntax not as Error
930930
nasm_ctx_outside_macro contexts outside macro not as Error
931931
nasm_no_warn potentially risky syntax not as ToDo
932932

933+
ASTRO *astro.vim* *ft-astro-syntax*
933934

934-
ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax*
935+
Configuration
936+
937+
The following variables control certain syntax highlighting features.
938+
You can add them to your .vimrc: >
939+
let g:astro_typescript = "enable"
940+
<
941+
Enables TypeScript and TSX for ".astro" files. Default Value: "disable" >
942+
let g:astro_stylus = "enable"
943+
<
944+
Enables Stylus for ".astro" files. Default Value: "disable"
945+
946+
NOTE: You need to install an external plugin to support stylus in astro files.
947+
948+
949+
ASPPERL *ft-aspperl-syntax*
950+
ASPVBS *ft-aspvbs-syntax*
935951

936952
*.asp and *.asa files could be either Perl or Visual Basic script. Since it's
937953
hard to detect this you can set two global variables to tell Vim what you are
@@ -1467,9 +1483,9 @@ Two syntax highlighting files exist for Euphoria. One for Euphoria
14671483
version 3.1.1, which is the default syntax highlighting file, and one for
14681484
Euphoria version 4.0.5 or later.
14691485

1470-
Euphoria version 3.1.1 (http://www.rapideuphoria.com/) is still necessary
1471-
for developing applications for the DOS platform, which Euphoria version 4
1472-
(http://www.openeuphoria.org/) does not support.
1486+
Euphoria version 3.1.1 (http://www.rapideuphoria.com/ link seems dead) is
1487+
still necessary for developing applications for the DOS platform, which
1488+
Euphoria version 4 (http://www.openeuphoria.org/) does not support.
14731489

14741490
The following file extensions are auto-detected as Euphoria file type:
14751491

@@ -1526,7 +1542,8 @@ Elixir.
15261542

15271543
FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax*
15281544

1529-
FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com
1545+
FlexWiki is an ASP.NET-based wiki package which used to be available at
1546+
http://www.flexwiki.com
15301547
NOTE: This site currently doesn't work, on Wikipedia is mentioned that
15311548
development stopped in 2009.
15321549

@@ -1999,15 +2016,25 @@ Function names are not highlighted, as the way to find functions depends on
19992016
how you write Java code. The syntax file knows two possible ways to highlight
20002017
functions:
20012018

2002-
If you write function declarations that are always indented by either
2003-
a tab, 8 spaces or 2 spaces you may want to set >
2019+
If you write function declarations that are consistently indented by either
2020+
a tab, or a space . . . or eight space character(s), you may want to set >
20042021
:let java_highlight_functions="indent"
2022+
:let java_highlight_functions="indent1"
2023+
:let java_highlight_functions="indent2"
2024+
:let java_highlight_functions="indent3"
2025+
:let java_highlight_functions="indent4"
2026+
:let java_highlight_functions="indent5"
2027+
:let java_highlight_functions="indent6"
2028+
:let java_highlight_functions="indent7"
2029+
:let java_highlight_functions="indent8"
2030+
Note that in terms of 'shiftwidth', this is the leftmost step of indentation.
20052031
However, if you follow the Java guidelines about how functions and classes are
2006-
supposed to be named (with respect to upper and lowercase), use >
2032+
supposed to be named (with respect to upper- and lowercase) and there is any
2033+
amount of indentation, you may want to set >
20072034
:let java_highlight_functions="style"
2008-
If both options do not work for you, but you would still want function
2009-
declarations to be highlighted create your own definitions by changing the
2010-
definitions in java.vim or by creating your own java.vim which includes the
2035+
If neither setting does work for you, but you would still want function
2036+
declarations to be highlighted, create your own definitions by changing the
2037+
definitions in java.vim or by creating your own java.vim that includes the
20112038
original one and then adds the code to highlight functions.
20122039

20132040
In Java 1.1 the functions System.out.println() and System.err.println() should
@@ -2071,6 +2098,15 @@ To disable syntax highlighting of errors: >
20712098
let g:vim_json_warnings = 0
20722099
20732100
2101+
JQ *jq.vim* *jq_quote_highlight* *ft-jq-syntax*
2102+
2103+
To disable numbers having their own color add the following to your vimrc: >
2104+
hi link jqNumber Normal
2105+
2106+
If you want quotes to have different highlighting than strings >
2107+
let g:jq_quote_highlight = 1
2108+
2109+
20742110
LACE *lace.vim* *ft-lace-syntax*
20752111

20762112
Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but the
@@ -2670,8 +2706,8 @@ perl_string_as_statement, it will be highlighted as in the second line.
26702706
The syncing has 3 options. The first two switch off some triggering of
26712707
synchronization and should only be needed in case it fails to work properly.
26722708
If while scrolling all of a sudden the whole screen changes color completely
2673-
then you should try and switch off one of those. Let me know if you can
2674-
figure out the line that causes the mistake.
2709+
then you should try and switch off one of those. Let the developer know if
2710+
you can figure out the line that causes the mistake.
26752711

26762712
One triggers on "^\s*sub\s*" and the other on "^[$@%]" more or less. >
26772713
@@ -3012,6 +3048,13 @@ To highlight R code in knitr chunk headers, add to your |vimrc|: >
30123048
let rrst_syn_hl_chunk = 1
30133049
30143050
3051+
RASI *rasi.vim* *ft-rasi-syntax*
3052+
3053+
Rasi stands for Rofi Advanced Style Information. It is used by the program
3054+
rofi to style the rendering of the search window. The language is heavily
3055+
inspired by CSS stylesheet. Files with the following extensions are recognized
3056+
as rasi files: .rasi.
3057+
30153058
READLINE *readline.vim* *ft-readline-syntax*
30163059

30173060
The readline library is primarily used by the BASH shell, which adds quite a
@@ -3728,6 +3771,19 @@ set "tf_minlines" to the value you desire. Example: >
37283771
37293772
:let tf_minlines = your choice
37303773
<
3774+
TYPESCRIPT *typescript.vim* *ft-typescript-syntax*
3775+
*typescriptreact.vim* *ft-typescriptreact-syntax*
3776+
3777+
There is one option to control the TypeScript syntax highlighting.
3778+
3779+
*g:typescript_host_keyword*
3780+
When this variable is set to 1, host-specific APIs such as `addEventListener`
3781+
are highlighted. To disable set it to zero in your .vimrc: >
3782+
3783+
let g:typescript_host_keyword = 0
3784+
<
3785+
The default value is 1.
3786+
37313787
VIM *vim.vim* *ft-vim-syntax*
37323788
*g:vimsyn_minlines* *g:vimsyn_maxlines*
37333789
There is a trade-off between more accurate syntax highlighting versus screen
@@ -3764,12 +3820,15 @@ Some folding is now supported with syntax/vim.vim: >
37643820
g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding
37653821
g:vimsyn_folding =~ 'a' : augroups
37663822
g:vimsyn_folding =~ 'f' : fold functions
3823+
g:vimsyn_folding =~ 'h' : fold heredocs
3824+
g:vimsyn_folding =~ 'H' : fold Vim9-script legacy headers
37673825
g:vimsyn_folding =~ 'l' : fold lua script
37683826
g:vimsyn_folding =~ 'm' : fold mzscheme script
37693827
g:vimsyn_folding =~ 'p' : fold perl script
37703828
g:vimsyn_folding =~ 'P' : fold python script
37713829
g:vimsyn_folding =~ 'r' : fold ruby script
37723830
g:vimsyn_folding =~ 't' : fold tcl script
3831+
let g:vimsyn_folding = 'acfhlmpPrt'
37733832
<
37743833
*g:vimsyn_noerror*
37753834
Not all error highlighting that syntax/vim.vim does may be correct; Vim script
@@ -4296,15 +4355,19 @@ Whether or not it is actually concealed depends on the value of the
42964355
'conceallevel' option. The 'concealcursor' option is used to decide whether
42974356
concealable items in the current line are displayed unconcealed to be able to
42984357
edit the line.
4299-
Another way to conceal text is with |matchadd()|.
4358+
4359+
Another way to conceal text is with |matchadd()|, but internally this works a
4360+
bit differently |syntax-vs-match|.
43004361

43014362
concealends *:syn-concealends*
43024363

43034364
When the "concealends" argument is given, the start and end matches of
43044365
the region, but not the contents of the region, are marked as concealable.
43054366
Whether or not they are actually concealed depends on the setting on the
43064367
'conceallevel' option. The ends of a region can only be concealed separately
4307-
in this way when they have their own highlighting via "matchgroup"
4368+
in this way when they have their own highlighting via "matchgroup". The
4369+
|synconcealed()| function can be used to retrieve information about conealed
4370+
items.
43084371

43094372
cchar *:syn-cchar*
43104373
*E844*

0 commit comments

Comments
 (0)