|
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 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -698,6 +698,28 @@ Remember to manually trigger the |FileType| event from a buffer with a Java |
698 | 698 | file loaded in it each time after assigning a new value to the variable: > |
699 | 699 | doautocmd FileType |
700 | 700 | < |
| 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 | +< |
701 | 723 |
|
702 | 724 | JSON-FORMAT *ft-json-plugin* |
703 | 725 |
|
@@ -754,7 +776,7 @@ Global mapping: |
754 | 776 |
|
755 | 777 | Local mappings: |
756 | 778 | <Plug>ManBS |
757 | | -<LocalLeader>h Clear backspace <BS> characters from the buffer |
| 779 | +<LocalLeader>h Clear backspace <BS> characters from the buffer. |
758 | 780 | CTRL-] Jump to the manual page for the word under the cursor. |
759 | 781 | CTRL-T Jump back to the previous manual page. |
760 | 782 |
|
|
0 commit comments