|
1 |
| -*change.txt* For Vim version 9.1. Last change: 2024 Nov 12 |
| 1 | +*change.txt* For Vim version 9.1. Last change: 2024 Dec 15 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -1512,18 +1512,17 @@ since formatting is highly dependent on the type of file. It makes
|
1512 | 1512 | sense to use an |autoload| script, so the corresponding script is only loaded
|
1513 | 1513 | when actually needed and the script should be called <filetype>format.vim.
|
1514 | 1514 |
|
1515 |
| -For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME |
1516 |
| -directory, sets the 'formatexpr' option to: > |
| 1515 | +For example, the XML filetype plugin distributed with Vim in the |
| 1516 | +$VIMRUNTIME/ftplugin directory, sets the 'formatexpr' option to: > |
1517 | 1517 |
|
1518 | 1518 | setlocal formatexpr=xmlformat#Format()
|
1519 | 1519 |
|
1520 | 1520 | That means, you will find the corresponding script, defining the
|
1521 |
| -xmlformat#Format() function, in the directory: |
1522 |
| -`$VIMRUNTIME/autoload/xmlformat.vim` |
| 1521 | +xmlformat#Format() function, in the file `$VIMRUNTIME/autoload/xmlformat.vim` |
1523 | 1522 |
|
1524 | 1523 | Here is an example script that removes trailing whitespace from the selected
|
1525 |
| -text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: > |
1526 |
| -
|
| 1524 | +text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: |
| 1525 | +>vim |
1527 | 1526 | func! format#Format()
|
1528 | 1527 | " only reformat on explicit gq command
|
1529 | 1528 | if mode() != 'n'
|
@@ -1556,7 +1555,7 @@ debugging it helps to set the 'debug' option.
|
1556 | 1555 |
|
1557 | 1556 | *right-justify*
|
1558 | 1557 | There is no command in Vim to right justify text. You can do it with
|
1559 |
| -an external command, like "par" (e.g.: "!}par" to format until the end of the |
| 1558 | +an external command, like "par" (e.g.: `:.,}!par` to format until the end of the |
1560 | 1559 | paragraph) or set 'formatprg' to "par".
|
1561 | 1560 |
|
1562 | 1561 | *format-comments*
|
@@ -1622,7 +1621,7 @@ type of comment string. A part consists of:
|
1622 | 1621 | some indent for the start or end part that can be removed.
|
1623 | 1622 |
|
1624 | 1623 | When a string has none of the 'f', 's', 'm' or 'e' flags, Vim assumes the
|
1625 |
| -comment string repeats at the start of each line. The flags field may be |
| 1624 | +comment string repeats at the start of each line. The {flags} field may be |
1626 | 1625 | empty.
|
1627 | 1626 |
|
1628 | 1627 | Any blank space in the text before and after the {string} is part of the
|
|
0 commit comments