Skip to content

Commit 41199c1

Browse files
committed
Update filetype.{txt,jax}
1 parent 00f03e8 commit 41199c1

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

doc/filetype.jax

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*filetype.txt* For Vim バージョン 9.1. Last change: 2025 Apr 27
1+
*filetype.txt* For Vim バージョン 9.1. Last change: 2025 May 10
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -693,6 +693,32 @@ HARE *ft-hare*
693693
このプラグインのテキストはかなり長いため、別ファイル |ft_hare.txt| に配置され
694694
ている: |ft_hare.txt|
695695

696+
HTML *ft-html-plugin*
697+
698+
タグの折り畳みにはいくつかの難しさがある。多くの要素、例えば `blockquote` は常
699+
に開始タグと終了タグで区切られる。一方、一部の要素、例えば `p` の終了タグは、
700+
特定のコンテキストでは省略可能である。一方、空要素、例えば `hr` には終了タグが
701+
ない。省略可能な終了タグをサポートするためのルールはアドホックで複雑だが [0]、
702+
スコープ内の要素に適用される。構文的に整形式性があると仮定すると、終了タグはス
703+
コープ内 [1] およびファイルの先頭付近で発見可能な最も近い開始タグと関連付ける
704+
ことができる。一方、不均衡なタグやインラインタグはすべて無視できる。構文ハイラ
705+
イトが有効になっている場合、|fold-expr| メソッドを用いたタグの折り畳みは以下で
706+
有効にできる: >
707+
let g:html_expr_folding = 1
708+
<
709+
デフォルトでは、|TextChanged| または |InsertLeave| イベントが発生するたびに、
710+
タグの折り畳みが最初からやり直される。特に大きなファイルの場合、このような頻度
711+
は望ましくない場合がある。この再計算は以下で無効にできる: >
712+
let g:html_expr_folding_without_recomputation = 1
713+
doautocmd FileType
714+
<
715+
再計算を強制するには、以下のようする: >
716+
unlet! b:foldsmap
717+
normal zx
718+
<
719+
[0] https://html.spec.whatwg.org/multipage/syntax.html#optional-tags
720+
[1] https://en.wikipedia.org/wiki/Dangling_else
721+
696722
IDRIS2 *ft-idris2-plugin*
697723

698724
デフォルトでは、以下のオプションが設定されている: >

en/filetype.txt

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -702,6 +702,32 @@ HARE *ft-hare*
702702
Since the text for this plugin is rather long it has been put in a separate
703703
file: |ft_hare.txt|.
704704

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+
705731
IDRIS2 *ft-idris2-plugin*
706732

707733
By default the following options are set: >

0 commit comments

Comments
 (0)