[vim/vim] Both "sub-expression" and "sub-match" terms are used in the docs (#5714)

9 views
Skip to first unread message

lkintact

unread,
Feb 29, 2020, 5:59:39 PM2/29/20
to vim/vim, Subscribed

Executing :lhelpgrep sub-expression and :lhelpgrep sub-match shows that both terms are used in the docs. Since they seem to mean the same maybe it's better to only leave one to remove the possible confusion.

Vim: https://github.com/vim/vim-win32-installer/releases/download/v8.2.0330/gvim_8.2.0330_x86.zip


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Gary Johnson

unread,
Feb 29, 2020, 8:16:22 PM2/29/20
to reply+ACY5DGFAK63WHSJWDE...@reply.github.com, vim...@googlegroups.com
On 2020-02-29, lkintact wrote:
> Executing :lhelpgrep sub-expression and :lhelpgrep sub-match shows that both
> terms are used in the docs. Since they seem to mean the same maybe it's better
> to only leave one to remove the possible confusion.

They don't mean the same thing. A sub-expression is part of
a regular expression, often delimited by \( and \). A sub-match is
the string matched by the sub-expression.

That said, there are a few places where "match" is refers to
a regular expression that finds a match, such as addmatch() and
":syntax match". There also appear to be a few instances of
"sub-match" in the documentation where "sub-pattern" would be more
correct. I don't think those usages cause any confusion, though.

Regards,
Gary

vim-dev ML

unread,
Feb 29, 2020, 8:16:49 PM2/29/20
to vim/vim, vim-dev ML, Your activity
On 2020-02-29, lkintact wrote:
> Executing :lhelpgrep sub-expression and :lhelpgrep sub-match shows that both
> terms are used in the docs. Since they seem to mean the same maybe it's better
> to only leave one to remove the possible confusion.

They don't mean the same thing. A sub-expression is part of
a regular expression, often delimited by \( and \). A sub-match is
the string matched by the sub-expression.

That said, there are a few places where "match" is refers to
a regular expression that finds a match, such as addmatch() and
":syntax match". There also appear to be a few instances of
"sub-match" in the documentation where "sub-pattern" would be more
correct. I don't think those usages cause any confusion, though.

Regards,
Gary

lkintact

unread,
Mar 1, 2020, 3:51:35 AM3/1/20
to vim/vim, vim-dev ML, Mention

@vim-ml I see, thank you. I'll leave the issue open in case anybody decides to make some corrections to the docs considering what you pointed out at.


You are receiving this because you were mentioned.

Reply all
Reply to author
Forward
0 new messages