|
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 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -1573,15 +1573,47 @@ ERLANG *erlang.vim* *ft-erlang-syntax*
|
1573 | 1573 | Erlang is a functional programming language developed by Ericsson. Files with
|
1574 | 1574 | the following extensions are recognized as Erlang files: erl, hrl, yaws.
|
1575 | 1575 |
|
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. |
1578 | 1577 |
|
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|: > |
1580 | 1580 |
|
1581 |
| -To enable highlighting some special atoms, put this in your vimrc: > |
| 1581 | + :let g:erlang_use_markdown_for_docs = 1 |
1582 | 1582 |
|
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. |
1584 | 1585 |
|
| 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 | +< |
1585 | 1617 |
|
1586 | 1618 | ELIXIR *elixir.vim* *ft-elixir-syntax*
|
1587 | 1619 |
|
|
0 commit comments