Commit: runtime(doc): update the change.txt help file

7 views
Skip to first unread message

Christian Brabandt

unread,
Dec 15, 2024, 3:45:13 PM12/15/24
to vim...@googlegroups.com
runtime(doc): update the change.txt help file

Commit: https://github.com/vim/vim/commit/41d6de2974429f5fc76fbeacc233a1fa66c6f869
Author: Antonio Giovanni Colombo <azc...@gmail.com>
Date: Sun Dec 15 21:17:49 2024 +0100

runtime(doc): update the change.txt help file

Signed-off-by: Antonio Giovanni Colombo <azc...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index e4366551d..301eacee2 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 9.1. Last change: 2024 Nov 12
+*change.txt* For Vim version 9.1. Last change: 2024 Dec 15


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1512,18 +1512,17 @@ since formatting is highly dependent on the type of file. It makes
sense to use an |autoload| script, so the corresponding script is only loaded
when actually needed and the script should be called <filetype>format.vim.

-For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME
-directory, sets the 'formatexpr' option to: >
+For example, the XML filetype plugin distributed with Vim in the
+$VIMRUNTIME/ftplugin directory, sets the 'formatexpr' option to: >

setlocal formatexpr=xmlformat#Format()

That means, you will find the corresponding script, defining the
-xmlformat#Format() function, in the directory:
-`$VIMRUNTIME/autoload/xmlformat.vim`
+xmlformat#Format() function, in the file `$VIMRUNTIME/autoload/xmlformat.vim`

Here is an example script that removes trailing whitespace from the selected
-text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
-
+text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim:
+>vim
func! format#Format()
" only reformat on explicit gq command
if mode() != 'n'
@@ -1556,7 +1555,7 @@ debugging it helps to set the 'debug' option.

*right-justify*
There is no command in Vim to right justify text. You can do it with
-an external command, like "par" (e.g.: "!}par" to format until the end of the
+an external command, like "par" (e.g.: `:.,}!par` to format until the end of the
paragraph) or set 'formatprg' to "par".

*format-comments*
@@ -1622,7 +1621,7 @@ type of comment string. A part consists of:
some indent for the start or end part that can be removed.

When a string has none of the 'f', 's', 'm' or 'e' flags, Vim assumes the
-comment string repeats at the start of each line. The flags field may be
+comment string repeats at the start of each line. The {flags} field may be
empty.

Any blank space in the text before and after the {string} is part of the
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 0f8b2051f..dde183e69 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -2034,6 +2034,7 @@ $quote eval.txt /*$quote*
: cmdline.txt /*:*
:! various.txt /*:!*
:!! various.txt /*:!!*
+:!-range various.txt /*:!-range*
:!cmd various.txt /*:!cmd*
:!start os_win32.txt /*:!start*
:# various.txt /*:#*
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 0ebcd0684..f8c3bef28 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 9.1. Last change: 2024 Nov 23
+*various.txt* For Vim version 9.1. Last change: 2024 Dec 15


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -322,6 +322,9 @@ g8 Print the hex values of the bytes used in the
in Vim window. `:term ++shell ++close {cmd}` could
serve as close approximation to what `:!{cmd}` does.

+ *:!-range*
+:{range}!{cmd} Like |:!| but execute {cmd} for each line in the
+ {range}.
*:!!*
:!! Repeat last ":!{cmd}".

Marius Gedminas

unread,
Dec 16, 2024, 4:27:23 AM12/16/24
to vim...@googlegroups.com
Sun, Dec 15, 2024 at 09:45:03PM +0100, Christian Brabandt rašė:
> runtime(doc): update the change.txt help file
>
> Commit: https://github.com/vim/vim/commit/41d6de2974429f5fc76fbeacc233a1fa66c6f869
> Author: Antonio Giovanni Colombo <azc...@gmail.com>
> Date: Sun Dec 15 21:17:49 2024 +0100
>
> runtime(doc): update the change.txt help file
>
> Signed-off-by: Antonio Giovanni Colombo <azc...@gmail.com>
> Signed-off-by: Christian Brabandt <c...@256bit.org>
...
> diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
> index 0ebcd0684..f8c3bef28 100644
> --- a/runtime/doc/various.txt
> +++ b/runtime/doc/various.txt
> @@ -1,4 +1,4 @@
> -*various.txt* For Vim version 9.1. Last change: 2024 Nov 23
> +*various.txt* For Vim version 9.1. Last change: 2024 Dec 15
>
>
> VIM REFERENCE MANUAL by Bram Moolenaar
> @@ -322,6 +322,9 @@ g8 Print the hex values of the bytes used in the
> in Vim window. `:term ++shell ++close {cmd}` could
> serve as close approximation to what `:!{cmd}` does.
>
> + *:!-range*
> +:{range}!{cmd} Like |:!| but execute {cmd} for each line in the
> + {range}.

This does not seem right? The text seems to imply that

:1,5!echo hi

will execute 'echo hi' five times, once for each line, but what it
actually does is execute `echo hi` once, feed those five lines into the
commands standard input, and replace them with the output of the
command (i.e. it filters those lines through a shell command).

Marius Gedminas
--
Was a time, all we got for christmas were bitfields. And we were happy!
-- Mike Barton
You had bitfields? When I wanted more bits I had to pull out my wirewrap tool
and put them in myself!
-- Andrew Dalke
signature.asc
Reply all
Reply to author
Forward
0 new messages