Skip to content

Commit f54ca67

Browse files
committed
Update syntax.{txt,jax}
1 parent 6770b7b commit f54ca67

File tree

2 files changed

+77
-12
lines changed

2 files changed

+77
-12
lines changed

doc/syntax.jax

Lines changed: 39 additions & 6 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 14
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -1544,15 +1544,48 @@ ERLANG *erlang.vim* *ft-erlang-syntax*
15441544
Erlang は Ericsson が開発した関数型プログラミング言語である。次の拡張子のファ
15451545
イルが Erlang ファイルとして認識される: erl, hrl, yaws
15461546

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

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

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

15571590
ELIXIR *elixir.vim* *ft-elixir-syntax*
15581591

en/syntax.txt

Lines changed: 38 additions & 6 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 14
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1573,15 +1573,47 @@ ERLANG *erlang.vim* *ft-erlang-syntax*
15731573
Erlang is a functional programming language developed by Ericsson. Files with
15741574
the following extensions are recognized as Erlang files: erl, hrl, yaws.
15751575

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

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

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

15861618
ELIXIR *elixir.vim* *ft-elixir-syntax*
15871619

0 commit comments

Comments
 (0)