Skip to content

Commit 90d6faa

Browse files
authored
Merge pull request #2061 from h-east/update-syntax
Update syntax.{txt,jax}
2 parents 51b9c24 + 1737360 commit 90d6faa

File tree

2 files changed

+37
-7
lines changed

2 files changed

+37
-7
lines changed

doc/syntax.jax

Lines changed: 19 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 Apr 15
1+
*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Apr 28
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -1037,8 +1037,13 @@ Cには幾つかの補助的なハイライト方法がある。それらを有
10371037
*c_ansi_typedefs* ... 但し標準ANSI型はハイライトする
10381038
*c_ansi_constants* ... 但し標準ANSI定数はハイライトする
10391039
*c_no_utf* 文字列中の\uと\Uをハイライトしない
1040-
*c_syntax_for_h* ファイル *.h に C++ ではなく C の構文を適用し、
1041-
objcpp ではなく objc の構文を適用する。
1040+
*c_syntax_for_h* *.h ファイルには C++/ObjC/ObjC++ ではなく C の構文を使
1041+
用する
1042+
(NOTE: この変数は非推奨であり現在は不要である。*.h ファ
1043+
イルは、C++ や Objective-C の構文が含まれていない限
1044+
り、デフォルトで C として扱われる。自動検出が失敗した
1045+
場合は、`g:filetype_h` を使ってデフォルトのファイルタ
1046+
イプを調整できる。)
10421047
*c_no_if0* "#if 0" のブロックをコメントとしてハイライトしない
10431048
*c_no_cformat* 文字列中の "%" によるフォーマットをハイライトしない
10441049
*c_no_c99* C99の標準アイテムをハイライトしない
@@ -1097,6 +1102,10 @@ C/C++ インタープリター。Ch は C に似た構文ハイライトを持
10971102

10981103
変数を設定すれば、*.h ファイルに対して C, C++ でなく Ch の構文を使うようにする
10991104
ことができる: >
1105+
:let g:filetype_h = 'ch'
1106+
1107+
NOTE: Vim の以前のバージョンでは、以下の (現在は非推奨の) 変数が使用されていた
1108+
が、現在は推奨される方法ではない: >
11001109
:let ch_syntax_for_h = 1
11011110
11021111
@@ -2107,6 +2116,13 @@ Note これら 3 つの変数は HTML 構文ファイルで維持されること
21072116
合は 1 行目の内容を表示するように以下で選択できる >
21082117
:let g:java_foldtext_show_first_or_second_line = 1
21092118
2119+
Javadoc コメント内の HTML タグは、|html-folding| に記載されている指示に従い、
2120+
以下に明示的に同意することでさらに折り畳むことができる >
2121+
:let g:java_consent_to_html_syntax_folding = 1
2122+
Javadoc コメント内のすべての開始タグとオプションの終了タグがバランスが取れてい
2123+
ない限り、この種の折り畳みをデフォルトにしないこと。そうでない場合は、構文のハ
2124+
イライトを壊す暴走した折り畳みが作成されることを我慢すること。
2125+
21102126
末尾の空白文字またはタブ文字の前の連続したスペース文字は、以下でエラーとして
21112127
マークされる >
21122128
:let g:java_space_errors = 1

en/syntax.txt

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

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1056,8 +1056,12 @@ Variable Highlight ~
10561056
*c_ansi_typedefs* ... but do standard ANSI types
10571057
*c_ansi_constants* ... but do standard ANSI constants
10581058
*c_no_utf* don't highlight \u and \U in strings
1059-
*c_syntax_for_h* for *.h files use C syntax instead of C++ and use objc
1060-
syntax instead of objcpp
1059+
*c_syntax_for_h* use C syntax for *.h files instead of C++/ObjC/ObjC++
1060+
(NOTE: This variable is deprecated and no longer
1061+
necessary, as *.h files now default to C, unless the
1062+
file contains C++ or Objective-C syntax. If the
1063+
automated detection fails, the default filetype can
1064+
be adjusted using `g:filetype_h`.)
10611065
*c_no_if0* don't highlight "#if 0" blocks as comments
10621066
*c_no_cformat* don't highlight %-formats in strings
10631067
*c_no_c99* don't highlight C99 standard items
@@ -1116,8 +1120,11 @@ the C syntax file. See |c.vim| for all the settings that are available for C.
11161120

11171121
By setting a variable you can tell Vim to use Ch syntax for *.h files, instead
11181122
of C or C++: >
1119-
:let ch_syntax_for_h = 1
1123+
:let g:filetype_h = 'ch'
11201124
1125+
NOTE: In previous versions of Vim, the following (now-deprecated) variable was
1126+
used, but is no longer the preferred approach: >
1127+
:let ch_syntax_for_h = 1
11211128
11221129
CHILL *chill.vim* *ft-chill-syntax*
11231130

@@ -2168,6 +2175,13 @@ line for any comments written in this way, and showing the contents of a first
21682175
line otherwise, with >
21692176
:let g:java_foldtext_show_first_or_second_line = 1
21702177
2178+
HTML tags in Javadoc comments can additionally be folded by following the
2179+
instructions listed under |html-folding| and giving explicit consent with >
2180+
:let g:java_consent_to_html_syntax_folding = 1
2181+
Do not default to this kind of folding unless ALL start tags and optional end
2182+
tags are balanced in Javadoc comments; otherwise, put up with creating runaway
2183+
folds that break syntax highlighting.
2184+
21712185
Trailing whitespace characters or a run of space characters before a tab
21722186
character can be marked as an error with >
21732187
:let g:java_space_errors = 1

0 commit comments

Comments
 (0)