Skip to content

Commit 3a1f704

Browse files
committed
Update syntax.{txt,jax}
1 parent b759693 commit 3a1f704

File tree

2 files changed

+145
-35
lines changed

2 files changed

+145
-35
lines changed

doc/syntax.jax

Lines changed: 73 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 24
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+
どちらの設定もうまくいかないが、関数宣言をハイライトしたい場合は、java.vim の
1973+
定義を変更するか、元の定義を組み込んだ独自の 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
のである。 >
@@ -3611,6 +3646,19 @@ tfの構文ハイライトには1つのオプションがある。
36113646
36123647
:let tf_minlines = your choice
36133648
<
3649+
TYPESCRIPT *typescript.vim* *ft-typescript-syntax*
3650+
*typescriptreact.vim* *ft-typescriptreact-syntax*
3651+
3652+
TypeScript 構文のハイライトを制御する 1 つのオプションがある。
3653+
3654+
*g:typescript_host_keyword*
3655+
この変数を 1 に設定すると、`addEventListener` などのホスト固有の API がハイラ
3656+
イトされる。無効にするには、.vimrc で 0 に設定する: >
3657+
3658+
let g:typescript_host_keyword = 0
3659+
<
3660+
デフォルト値は 1 である。
3661+
36143662
VIM *vim.vim* *ft-vim-syntax*
36153663
*g:vimsyn_minlines* *g:vimsyn_maxlines*
36163664
正確な構文ハイライトと画面更新速度はトレードオフの問題である。正確さを向上させ
@@ -3644,12 +3692,15 @@ syntax/vim.vim によって折り畳みが可能である: >
36443692
g:vimsyn_folding == 0 または変数が存在しない: 構文ベースの折り畳みはしない
36453693
g:vimsyn_folding =~ 'a' : augroups
36463694
g:vimsyn_folding =~ 'f' : 関数を折り畳む
3695+
g:vimsyn_folding =~ 'h' : heredocs を折り畳む
3696+
g:vimsyn_folding =~ 'H' : Vim9-script の旧来のヘッダーを折り畳む
36473697
g:vimsyn_folding =~ 'l' : lua スクリプトを折り畳む
36483698
g:vimsyn_folding =~ 'm' : mzscheme スクリプトを折り畳む
36493699
g:vimsyn_folding =~ 'p' : perl スクリプトを折り畳む
36503700
g:vimsyn_folding =~ 'P' : python スクリプトを折り畳む
36513701
g:vimsyn_folding =~ 'r' : ruby スクリプトを折り畳む
36523702
g:vimsyn_folding =~ 't' : tcl スクリプトを折り畳む
3703+
let g:vimsyn_folding = 'acfhlmpPrt'
36533704
<
36543705
*g:vimsyn_noerror*
36553706
syntax/vim.vimによるエラーのハイライトは必ずしも正しいとは限らない。Vim script
@@ -4160,14 +4211,17 @@ conceal *conceal* *:syn-conceal*
41604211
際に Conceal 表示されるかどうかは 'conceallevel' オプションの設定に依存する。
41614212
現在行のアイテムを Conceal 表示するかどうかは 'concealcursor' オプションで制御
41624213
できる (行の編集を妨げないようにするため)。
4163-
もう一つの方法として|matchadd()|を用いても、テキストを隠すことができる。
4214+
テキストを隠す別の方法は |matchadd()| を使用することだが、内部的には
4215+
|syntax-vs-match| とは少し異なる動作をする。
41644216

41654217
concealends *:syn-concealends*
41664218

41674219
"concealends" 引数が指定されると、リージョンの開始部分と終了部分が Conceal 可
41684220
能になる (リージョンの中身はならない)。アイテムが実際に Conceal 表示されるかど
41694221
うかは 'conceallevel' の設定に依存する。"matchgroup" で別のハイライトを設定す
41704222
ることでリージョンの終了部分だけを別に Conceal 表示するということもできる。
4223+
The |synconcealed()| function can be used to retrieve information about conealed items.
4224+
|synconcealed()| 関数を使用すると、conceal された項目に関する情報を取得できる。
41714225

41724226
cchar *:syn-cchar*
41734227
*E844*

en/syntax.txt

Lines changed: 72 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 24
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
@@ -3728,6 +3764,19 @@ set "tf_minlines" to the value you desire. Example: >
37283764
37293765
:let tf_minlines = your choice
37303766
<
3767+
TYPESCRIPT *typescript.vim* *ft-typescript-syntax*
3768+
*typescriptreact.vim* *ft-typescriptreact-syntax*
3769+
3770+
There is one option to control the TypeScript syntax highlighting.
3771+
3772+
*g:typescript_host_keyword*
3773+
When this variable is set to 1, host-specific APIs such as `addEventListener`
3774+
are highlighted. To disable set it to zero in your .vimrc: >
3775+
3776+
let g:typescript_host_keyword = 0
3777+
<
3778+
The default value is 1.
3779+
37313780
VIM *vim.vim* *ft-vim-syntax*
37323781
*g:vimsyn_minlines* *g:vimsyn_maxlines*
37333782
There is a trade-off between more accurate syntax highlighting versus screen
@@ -3764,12 +3813,15 @@ Some folding is now supported with syntax/vim.vim: >
37643813
g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding
37653814
g:vimsyn_folding =~ 'a' : augroups
37663815
g:vimsyn_folding =~ 'f' : fold functions
3816+
g:vimsyn_folding =~ 'h' : fold heredocs
3817+
g:vimsyn_folding =~ 'H' : fold Vim9-script legacy headers
37673818
g:vimsyn_folding =~ 'l' : fold lua script
37683819
g:vimsyn_folding =~ 'm' : fold mzscheme script
37693820
g:vimsyn_folding =~ 'p' : fold perl script
37703821
g:vimsyn_folding =~ 'P' : fold python script
37713822
g:vimsyn_folding =~ 'r' : fold ruby script
37723823
g:vimsyn_folding =~ 't' : fold tcl script
3824+
let g:vimsyn_folding = 'acfhlmpPrt'
37733825
<
37743826
*g:vimsyn_noerror*
37753827
Not all error highlighting that syntax/vim.vim does may be correct; Vim script
@@ -4296,15 +4348,19 @@ Whether or not it is actually concealed depends on the value of the
42964348
'conceallevel' option. The 'concealcursor' option is used to decide whether
42974349
concealable items in the current line are displayed unconcealed to be able to
42984350
edit the line.
4299-
Another way to conceal text is with |matchadd()|.
4351+
4352+
Another way to conceal text is with |matchadd()|, but internally this works a
4353+
bit differently |syntax-vs-match|.
43004354

43014355
concealends *:syn-concealends*
43024356

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

43094365
cchar *:syn-cchar*
43104366
*E844*

0 commit comments

Comments
 (0)