Skip to content

Commit 42afebc

Browse files
authored
Merge pull request #2159 from h-east/update-syntax
Update syntax.{txt,jax}
2 parents 87a7867 + d7c6a89 commit 42afebc

File tree

2 files changed

+87
-16
lines changed

2 files changed

+87
-16
lines changed

doc/syntax.jax

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Jun 03
1+
*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Jul 20
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -263,6 +263,9 @@ NOTE: 長い行があって表示が遅く、構文ハイライトをオフに
263263
Debug o デバッグ命令
264264

265265
*Underlined o 目立つ文章, HTMLリンク
266+
*Bold o 太字のテキスト
267+
*Italic o 斜体のテキスト
268+
*BoldItalic o 太字かつ斜体のテキスト
266269

267270
*Ignore o (見た目上)空白, 不可視 |hl-Ignore|
268271

@@ -1544,15 +1547,48 @@ ERLANG *erlang.vim* *ft-erlang-syntax*
15441547
Erlang は Ericsson が開発した関数型プログラミング言語である。次の拡張子のファ
15451548
イルが Erlang ファイルとして認識される: erl, hrl, yaws
15461549

1547-
組み込み関数 (BIFs: built-in functions) はデフォルトで強調表示される。それを無
1548-
効化するには vimrc で次のように設定する: >
1550+
Vim はデフォルトで、トリプルクォートで囲まれたドキュメント文字列をコメントとし
1551+
てハイライトする。
15491552

1550-
:let g:erlang_highlight_bifs = 0
1553+
トリプルクォートで囲まれたドキュメント文字列を Markdown としてハイライトしたい
1554+
場合は、|.vimrc| に次の行を追加する: >
15511555
1552-
いくつかの特殊アトムを強調表示するには、vimrc で次のように設定する: >
1556+
:let g:erlang_use_markdown_for_docs = 1
15531557
1554-
:let g:erlang_highlight_special_atoms = 1
1558+
ドキュメント文字列内のプレーンテキスト (つまり、Markdown 構文でハイライトされ
1559+
ない文字) は、コメントとしてハイライト表示される。
15551560

1561+
ドキュメント文字列内のプレーンテキストを別のハイライトグループでハイライトした
1562+
い場合は、|.vimrc| に次の行を追加する (この例では、文字列ハイライトグループを
1563+
使用してプレーンテキストをハイライトしている): >
1564+
1565+
:let g:erlang_docstring_default_highlight = 'String'
1566+
1567+
Markdown を有効にしていない場合、この行は指定されたハイライトグループに従って
1568+
ドキュメントストリング全体をハイライトする。
1569+
1570+
プレーンテキストのハイライトを無効にするには、以下の行を使用する: >
1571+
1572+
:let g:erlang_docstring_default_highlight = ''
1573+
1574+
構成例: >
1575+
1576+
" ドキュメント文字列を Markdown としてハイライトする。
1577+
:let g:erlang_use_markdown_for_docs = 1
1578+
1579+
" 1. docstring 内の Markdown 要素を Markdown としてハイライトする。
1580+
" 2. docstring 内のプレーンテキストを文字列としてハイライトする。
1581+
:let g:erlang_use_markdown_for_docs = 1
1582+
:let g:erlang_docstring_default_highlight = 'String'
1583+
1584+
" docstring を文字列としてハイライトする (Markdown なし)。
1585+
:let g:erlang_docstring_default_highlight = 'String'
1586+
1587+
" 1. docstring 内の Markdown 要素を Markdown としてハイライトする。
1588+
" 2. ドキュメント文字列内のプレーンテキストをハイライトしない。
1589+
:let g:erlang_use_markdown_for_docs = 1
1590+
:let g:erlang_docstring_default_highlight = ''
1591+
<
15561592

15571593
ELIXIR *elixir.vim* *ft-elixir-syntax*
15581594

@@ -4194,13 +4230,13 @@ ZSH *zsh.vim* *ft-zsh-syntax*
41944230

41954231
☆キーワードの定義 *:syn-keyword*
41964232

4197-
:sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}]
4233+
:sy[ntax] keyword {group-name} [{options}] {keyword} ... [{options}]
41984234

41994235
キーワードを定義する。
42004236

42014237
{group-name} "Comment" のような構文グループ名。
42024238
[{options}] 後述の|:syn-arguments|を参照。
4203-
{keyword} .. このグループに含めるキーワードのリスト。
4239+
{keyword} ... このグループに含めるキーワードのリスト。
42044240

42054241
例: >
42064242
:syntax keyword Type int long char

en/syntax.txt

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 9.1. Last change: 2025 Jun 03
1+
*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 20
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -262,6 +262,9 @@ you can see the actual color, except for "Ignore"):
262262
Debug debugging statements
263263

264264
*Underlined text that stands out, HTML links
265+
*Bold bold text
266+
*Italic italic text
267+
*BoldItalic bold and italic text
265268

266269
*Ignore left blank, hidden |hl-Ignore|
267270

@@ -1573,15 +1576,47 @@ ERLANG *erlang.vim* *ft-erlang-syntax*
15731576
Erlang is a functional programming language developed by Ericsson. Files with
15741577
the following extensions are recognized as Erlang files: erl, hrl, yaws.
15751578

1576-
The BIFs (built-in functions) are highlighted by default. To disable this,
1577-
put the following line in your vimrc: >
1579+
Vim highlights triple-quoted docstrings as comments by default.
15781580

1579-
:let g:erlang_highlight_bifs = 0
1581+
If you want triple-quoted docstrings highlighted as Markdown, add the
1582+
following line to your |.vimrc|: >
15801583
1581-
To enable highlighting some special atoms, put this in your vimrc: >
1584+
:let g:erlang_use_markdown_for_docs = 1
15821585
1583-
:let g:erlang_highlight_special_atoms = 1
1586+
The plain text inside the docstrings (that is, the characters that are not
1587+
highlighted by the Markdown syntax) is still highlighted as a comment.
15841588

1589+
If you want to highlight the plain text inside the docstrings using a
1590+
different highlight group, add the following line to your |.vimrc| (the
1591+
example highlights plain text using the String highlight group): >
1592+
1593+
:let g:erlang_docstring_default_highlight = 'String'
1594+
1595+
If you don't enable Markdown, this line highlights the full docstrings
1596+
according to the specified highlight group.
1597+
1598+
Use the following line to disable highlighting for the plain text: >
1599+
1600+
:let g:erlang_docstring_default_highlight = ''
1601+
1602+
Configuration examples: >
1603+
1604+
" Highlight docstrings as Markdown.
1605+
:let g:erlang_use_markdown_for_docs = 1
1606+
1607+
" 1. Highlight Markdown elements in docstrings as Markdown.
1608+
" 2. Highlight the plain text in docstrings as String.
1609+
:let g:erlang_use_markdown_for_docs = 1
1610+
:let g:erlang_docstring_default_highlight = 'String'
1611+
1612+
" Highlight docstrings as strings (no Markdown).
1613+
:let g:erlang_docstring_default_highlight = 'String'
1614+
1615+
" 1. Highlight Markdown elements in docstrings as Markdown.
1616+
" 2. Don't highlight the plain text in docstrings.
1617+
:let g:erlang_use_markdown_for_docs = 1
1618+
:let g:erlang_docstring_default_highlight = ''
1619+
<
15851620

15861621
ELIXIR *elixir.vim* *ft-elixir-syntax*
15871622

@@ -4318,13 +4353,13 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
43184353

43194354
DEFINING KEYWORDS *:syn-keyword*
43204355

4321-
:sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}]
4356+
:sy[ntax] keyword {group-name} [{options}] {keyword} ... [{options}]
43224357

43234358
This defines a number of keywords.
43244359

43254360
{group-name} Is a syntax group name such as "Comment".
43264361
[{options}] See |:syn-arguments| below.
4327-
{keyword} .. Is a list of keywords which are part of this group.
4362+
{keyword} ... Is a list of keywords which are part of this group.
43284363

43294364
Example: >
43304365
:syntax keyword Type int long char

0 commit comments

Comments
 (0)