Skip to content

Update syntax.{txt,jax} #2159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions doc/syntax.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Jun 03
*syntax.txt* For Vim バージョン 9.1. Last change: 2025 Jul 14


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

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

:let g:erlang_highlight_bifs = 0
トリプルクォートで囲まれたドキュメント文字列を Markdown としてハイライトしたい
場合は、|.vimrc| に次の行を追加する: >

いくつかの特殊アトムを強調表示するには、vimrc で次のように設定する: >
:let g:erlang_use_markdown_for_docs = 1

:let g:erlang_highlight_special_atoms = 1
ドキュメント文字列内のプレーンテキスト (つまり、Markdown 構文でハイライトされ
ない文字) は、コメントとしてハイライト表示される。

ドキュメント文字列内のプレーンテキストを別のハイライトグループでハイライトした
い場合は、|.vimrc| に次の行を追加する (この例では、文字列ハイライトグループを
使用してプレーンテキストをハイライトしている): >

:let g:erlang_docstring_default_highlight = 'String'

Markdown を有効にしていない場合、この行は指定されたハイライトグループに従って
ドキュメントストリング全体をハイライトする。

プレーンテキストのハイライトを無効にするには、以下の行を使用する: >

:let g:erlang_docstring_default_highlight = ''

構成例: >

" ドキュメント文字列をMarkdownとしてハイライトする。
:let g:erlang_use_markdown_for_docs = 1

" 1. docstring 内の Markdown 要素を Markdown としてハイライトする。
" 2. docstring 内のプレーンテキストを文字列としてハイライトする。
:let g:erlang_use_markdown_for_docs = 1
:let g:erlang_docstring_default_highlight = 'String'

" docstring を文字列としてハイライトする (Markdown なし)。
:let g:erlang_docstring_default_highlight = 'String'

" 1. docstring 内の Markdown 要素を Markdown としてハイライトする。
" 2. ドキュメント文字列内のプレーンテキストをハイライトしない。
:let g:erlang_use_markdown_for_docs = 1
:let g:erlang_docstring_default_highlight = ''
<

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

Expand Down
44 changes: 38 additions & 6 deletions en/syntax.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2025 Jun 03
*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 14


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

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

:let g:erlang_highlight_bifs = 0
If you want triple-quoted docstrings highlighted as Markdown, add the
following line to your |.vimrc|: >

To enable highlighting some special atoms, put this in your vimrc: >
:let g:erlang_use_markdown_for_docs = 1

:let g:erlang_highlight_special_atoms = 1
The plain text inside the docstrings (that is, the characters that are not
highlighted by the Markdown syntax) is still highlighted as a comment.

If you want to highlight the plain text inside the docstrings using a
different highlight group, add the following line to your |.vimrc| (the
example highlights plain text using the String highlight group): >

:let g:erlang_docstring_default_highlight = 'String'

If you don't enable Markdown, this line highlights the full docstrings
according to the specified highlight group.

Use the following line to disable highlighting for the plain text: >

:let g:erlang_docstring_default_highlight = ''

Configuration examples: >

" Highlight docstrings as Markdown.
:let g:erlang_use_markdown_for_docs = 1

" 1. Highlight Markdown elements in docstrings as Markdown.
" 2. Highlight the plain text in docstrings as String.
:let g:erlang_use_markdown_for_docs = 1
:let g:erlang_docstring_default_highlight = 'String'

" Highlight docstrings as strings (no Markdown).
:let g:erlang_docstring_default_highlight = 'String'

" 1. Highlight Markdown elements in docstrings as Markdown.
" 2. Don't highlight the plain text in docstrings.
:let g:erlang_use_markdown_for_docs = 1
:let g:erlang_docstring_default_highlight = ''
<

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

Expand Down