|
1 |
| -*filetype.txt* For Vim version 9.1. Last change: 2025 Apr 27 |
| 1 | +*filetype.txt* For Vim version 9.1. Last change: 2025 May 10 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -702,6 +702,32 @@ HARE *ft-hare*
|
702 | 702 | Since the text for this plugin is rather long it has been put in a separate
|
703 | 703 | file: |ft_hare.txt|.
|
704 | 704 |
|
| 705 | +HTML *ft-html-plugin* |
| 706 | + |
| 707 | +Tag folding poses a few difficulties. Many elements, e.g. `blockquote`, are |
| 708 | +always delimited by start and end tags; end tags for some elements, e.g. `p`, |
| 709 | +can be omitted in certain contexts; void elements, e.g. `hr`, have no end tag. |
| 710 | +Although the rules for supporting omissible end tags are ad-hoc and involved |
| 711 | +[0], they apply to elements in scope. Assuming syntactical wellformedness, an |
| 712 | +end tag can be associated with its nearest matching start tag discoverable in |
| 713 | +scope [1] and towards the beginning of a file, whereas all unbalanced tags and |
| 714 | +inlined tags can be disregarded. Having syntax highlighting in effect, tag |
| 715 | +folding using the |fold-expr| method can be enabled with: > |
| 716 | + let g:html_expr_folding = 1 |
| 717 | +< |
| 718 | +By default, tag folding will be redone from scratch after each occurrence of |
| 719 | +a |TextChanged| or an |InsertLeave| event. Such frequency may not be desired, |
| 720 | +especially for large files, and this recomputation can be disabled with: > |
| 721 | + let g:html_expr_folding_without_recomputation = 1 |
| 722 | + doautocmd FileType |
| 723 | +< |
| 724 | +To force another recomputation, do: > |
| 725 | + unlet! b:foldsmap |
| 726 | + normal zx |
| 727 | +< |
| 728 | +[0] https://html.spec.whatwg.org/multipage/syntax.html#optional-tags |
| 729 | +[1] https://en.wikipedia.org/wiki/Dangling_else |
| 730 | + |
705 | 731 | IDRIS2 *ft-idris2-plugin*
|
706 | 732 |
|
707 | 733 | By default the following options are set: >
|
|
0 commit comments