Skip to content

Commit e5e5fa1

Browse files
authored
Merge pull request #1735 from vim-jp/hh-update-filetype
Update filetype.{txt,jax}
2 parents a489631 + 0db0721 commit e5e5fa1

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

doc/filetype.jax

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*filetype.txt* For Vim バージョン 9.1. Last change: 2024 Aug 21
1+
*filetype.txt* For Vim バージョン 9.1. Last change: 2024 Oct 05
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -689,6 +689,26 @@ Note Zip プラグインで読み込まれたバッファ内で "gf" コマン
689689
から |FileType| イベントを手動でトリガーすること: >
690690
doautocmd FileType
691691
<
692+
Markdown ドキュメントのコメントには、見た目上の理由から、コメントマーク (`///`)
693+
の後に垂直の先頭の空白が続くことがある。ただし、Markdown では、コードブロック
694+
などを示すため、先頭の空白の水平の連続が重要になる。便利のよいように、|gq|
695+
ペレータに 'formatexpr' 機能が提供されている。"g:java_ignore_javadoc" も
696+
"g:java_ignore_markdown" も定義されていない限り、Markdown コメントの再フォー
697+
マットは、以下のようにしてオンデマンドで有効にできる: >
698+
setlocal formatexpr=g:javaformat#RemoveCommonMarkdownWhitespace()
699+
<
700+
または、Vim バージョンが `7.4.265` 未満の場合は、以下のようにする: >
701+
setlocal formatexpr=javaformat#RemoveCommonMarkdownWhitespace()
702+
<
703+
この関数は、行の範囲を受け入れ、共通の垂直方向の先頭の空白を削除し、範囲内の行
704+
を書き換える。作成者のレイアウトスタイルとコメントの内容に応じて、再フォーマッ
705+
トのために選択する行は、コメント全体からコメントの一部までさまざまである。
706+
707+
"g:java_ignore_markdown" または "g:java_ignore_javadoc" を削除した後で毎回
708+
Markdown コメントの認識を有効にするには、`8.2.1397` 以降のバージョンの Vim で
709+
は "javaformat.vim" を手動で再読込みすることを忘れないこと: >
710+
runtime autoload/javaformat.vim
711+
<
692712

693713
JSON-FORMAT *ft-json-plugin*
694714

en/filetype.txt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*filetype.txt* For Vim version 9.1. Last change: 2024 Aug 21
1+
*filetype.txt* For Vim version 9.1. Last change: 2024 Oct 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -698,6 +698,28 @@ Remember to manually trigger the |FileType| event from a buffer with a Java
698698
file loaded in it each time after assigning a new value to the variable: >
699699
doautocmd FileType
700700
<
701+
Markdown documentation comments may contain common runs of vertical leading
702+
whitespace following the comment marks (`///`) for aesthetic reasons; however,
703+
some horizontal runs of leading whitespace are significant in Markdown because
704+
they denote code blocks etc. For convenience, a 'formatexpr' function is
705+
provided for the |gq| operator. As long as neither "g:java_ignore_javadoc"
706+
nor "g:java_ignore_markdown" is defined, the reformatting of Markdown comments
707+
can be enabled on demand with: >
708+
setlocal formatexpr=g:javaformat#RemoveCommonMarkdownWhitespace()
709+
<
710+
Or for Vim versions less than `7.4.265`, with: >
711+
setlocal formatexpr=javaformat#RemoveCommonMarkdownWhitespace()
712+
<
713+
This function accepts a range of lines, removes a common run of vertical
714+
leading whitespace, and rewrites the lines of the range. Depending on the
715+
author's layout style and the comment contents, which lines to select for
716+
reformatting can vary from the whole comment to only some portion of it.
717+
718+
To enable the recognition of Markdown comments each time after removing
719+
"g:java_ignore_markdown" or "g:java_ignore_javadoc", remember to manually
720+
re-source "javaformat.vim" for Vim versions greater than `8.2.1397`: >
721+
runtime autoload/javaformat.vim
722+
<
701723

702724
JSON-FORMAT *ft-json-plugin*
703725

@@ -754,7 +776,7 @@ Global mapping:
754776
755777
Local mappings:
756778
<Plug>ManBS
757-
<LocalLeader>h Clear backspace <BS> characters from the buffer
779+
<LocalLeader>h Clear backspace <BS> characters from the buffer.
758780
CTRL-] Jump to the manual page for the word under the cursor.
759781
CTRL-T Jump back to the previous manual page.
760782

0 commit comments

Comments
 (0)