Re: Search anomaly?

"'Susan McElheny' via vim_use" <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <CANrhvDEiFh+SdRFS9XhyXBaa7bQFnwW7BUsJYTKgHZ1NQGNREQ@mail.gmail.com>
Don't know if this helps but if you have
aaaa

Vim will find the first set of aa's and go to the second set of aa's as if
it was 'aa aa'.  Assuming because it already included the 2nd a in the
first set of aa's.

On Wed, Dec 18, 2024 at 2:22 PM Arun E <[email protected]> wrote:

> Hi,
>
> With a buffer having just..
>
> aaa
> bbb
> aaa
>
> ..and with the cursor on the first 'a' on the first line, when you search
> for 'aa', the hit on the first line -- the 'aa' starting at column 2 -- is
> not found, rather the cursor lands on the 3rd line. Is this a documented
> behavior? It is the same behaviour in vim 8 and 9. I have not tried other
> versions.
>
> Playing around on it a bit more, I kinda understand why. Vim seems to try
> to match the "aa" in the current position, and avoid the 'a' in column 2
> for subsequent matches. A zero width pattern seems to hit all
> occurrences (\(aa\)\@=).
>
> Anyway, the current behavior is very confusing, perhaps should be
> documented if not done already.
>
> Regards,
> -Arun
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/vim_use/CAJUkyiFUkaBcKLXDh-CBNSZGYqATaUOMYz2tOqAQuOzD4uNFRA%40mail.gmail.com
> <https://groups.google.com/d/msgid/vim_use/CAJUkyiFUkaBcKLXDh-CBNSZGYqATaUOMYz2tOqAQuOzD4uNFRA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CANrhvDEiFh%2BSdRFS9XhyXBaa7bQFnwW7BUsJYTKgHZ1NQGNREQ%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.