[vim/vim] A couple of corrections to the docs (Issue #17991)

8 views
Skip to first unread message

lkintact

unread,
Aug 13, 2025, 5:58:42 PM8/13/25
to vim/vim, Subscribed
lkintact created an issue (vim/vim#17991)

Steps to reproduce

  1. In doc/cmdline.txt, at help :range-pattern, in line 838, an example is given: /pat1//pat2/.
    That should probably be :/pat1/,/pat2/ instead (notice the comma).

  2. In the same file, the text in lines 732-735 should perhaps be colored helpExample.

Expected behaviour

.

Version of Vim

9.1.1627

Environment

.

Logs and stack traces


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17991@github.com>

zeertzjq

unread,
Aug 13, 2025, 7:53:48 PM8/13/25
to vim/vim, Subscribed
zeertzjq left a comment (vim/vim#17991)
  1. In doc/cmdline.txt, at help :range-pattern, in line 383, the range example /pat1//pat2/ should probably be replaced with /pat1/,/pat2/ (notice the comma).

This isn't correct. /pat1//pat2/ is an address. If you change it to /pat1/,/pat2/ it'll become a range, which doesn't match the description that just follows.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17991/3186217563@github.com>

lkintact

unread,
Aug 14, 2025, 1:55:07 PM8/14/25
to vim/vim, Subscribed
lkintact left a comment (vim/vim#17991)

This isn't correct. /pat1//pat2/ is an address.

Thank you, but if /pat1//pat2/ is an address, I think it's confusing that it's compared with 7;/pat2/ (second example), which is a range.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17991/3189379898@github.com>

Christian Brabandt

unread,
Aug 14, 2025, 2:22:28 PM8/14/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17991)

The idea is exactly to explain the difference between using ; and not. I think the idea for /pat1//pat2/ is like a direction. Go first to pat1 and then to pat2 and perform your action here. But it is not a range, but only a single address. while the idea for /pat1/;/pat2/ is rather perform action from pat1 until pat2.

Examples help. Takes this file content:

1: start here
2: pat1 here
3: random stuff
4: pat2 first match
5: pat2 second match

Place your cursor on the first line, type :/pat1//pat2/d and it will only delete line 4. Use :/pat1/;/pat2/d and it will delete from line2 until line 4


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17991/3189453375@github.com>

Christian Brabandt

unread,
Aug 14, 2025, 2:22:28 PM8/14/25
to vim/vim, Subscribed

Closed #17991 as not planned.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/17991/issue_event/19164739674@github.com>

Reply all
Reply to author
Forward
0 new messages