Skip to content

Update filetype.{txt,jax} #2071

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 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
28 changes: 27 additions & 1 deletion doc/filetype.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*filetype.txt* For Vim バージョン 9.1. Last change: 2025 Apr 27
*filetype.txt* For Vim バージョン 9.1. Last change: 2025 May 10


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

HTML *ft-html-plugin*

タグの折り畳みにはいくつかの難しさがある。多くの要素、例えば `blockquote` は常
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poses は、ただ「ある」だけでいいかちょっと悩みますね。
「困難を引き起す」、はちょっと固いかな?

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

IDRIS2 *ft-idris2-plugin*

デフォルトでは、以下のオプションが設定されている: >
Expand Down
28 changes: 27 additions & 1 deletion en/filetype.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.1. Last change: 2025 Apr 27
*filetype.txt* For Vim version 9.1. Last change: 2025 May 10


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

HTML *ft-html-plugin*

Tag folding poses a few difficulties. Many elements, e.g. `blockquote`, are
always delimited by start and end tags; end tags for some elements, e.g. `p`,
can be omitted in certain contexts; void elements, e.g. `hr`, have no end tag.
Although the rules for supporting omissible end tags are ad-hoc and involved
[0], they apply to elements in scope. Assuming syntactical wellformedness, an
end tag can be associated with its nearest matching start tag discoverable in
scope [1] and towards the beginning of a file, whereas all unbalanced tags and
inlined tags can be disregarded. Having syntax highlighting in effect, tag
folding using the |fold-expr| method can be enabled with: >
let g:html_expr_folding = 1
<
By default, tag folding will be redone from scratch after each occurrence of
a |TextChanged| or an |InsertLeave| event. Such frequency may not be desired,
especially for large files, and this recomputation can be disabled with: >
let g:html_expr_folding_without_recomputation = 1
doautocmd FileType
<
To force another recomputation, do: >
unlet! b:foldsmap
normal zx
<
[0] https://html.spec.whatwg.org/multipage/syntax.html#optional-tags
[1] https://en.wikipedia.org/wiki/Dangling_else

IDRIS2 *ft-idris2-plugin*

By default the following options are set: >
Expand Down