diff --git a/doc/syntax.jax b/doc/syntax.jax index 6b6ed5e55..556cf8059 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -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 20 VIMリファレンスマニュアル by Bram Moolenaar @@ -263,6 +263,9 @@ NOTE: 長い行があって表示が遅く、構文ハイライトをオフに Debug o デバッグ命令 *Underlined o 目立つ文章, HTMLリンク + *Bold o 太字のテキスト + *Italic o 斜体のテキスト + *BoldItalic o 太字かつ斜体のテキスト *Ignore o (見た目上)空白, 不可視 |hl-Ignore| @@ -1544,15 +1547,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* @@ -4194,13 +4230,13 @@ ZSH *zsh.vim* *ft-zsh-syntax* ☆キーワードの定義 *:syn-keyword* -:sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}] +:sy[ntax] keyword {group-name} [{options}] {keyword} ... [{options}] キーワードを定義する。 {group-name} "Comment" のような構文グループ名。 [{options}] 後述の|:syn-arguments|を参照。 - {keyword} .. このグループに含めるキーワードのリスト。 + {keyword} ... このグループに含めるキーワードのリスト。 例: > :syntax keyword Type int long char diff --git a/en/syntax.txt b/en/syntax.txt index 44fed277f..b90c01b1d 100644 --- a/en/syntax.txt +++ b/en/syntax.txt @@ -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 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -262,6 +262,9 @@ you can see the actual color, except for "Ignore"): Debug debugging statements *Underlined text that stands out, HTML links + *Bold bold text + *Italic italic text + *BoldItalic bold and italic text *Ignore left blank, hidden |hl-Ignore| @@ -1573,15 +1576,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* @@ -4318,13 +4353,13 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword* DEFINING KEYWORDS *:syn-keyword* -:sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}] +:sy[ntax] keyword {group-name} [{options}] {keyword} ... [{options}] This defines a number of keywords. {group-name} Is a syntax group name such as "Comment". [{options}] See |:syn-arguments| below. - {keyword} .. Is a list of keywords which are part of this group. + {keyword} ... Is a list of keywords which are part of this group. Example: > :syntax keyword Type int long char