Wednesday, February 14, 2024

Re: Commit: patch 9.1.0009: Cannot easily get the list of matches

I was hoping it would do multiline regex searches as well (help doesn't mention it can't do it)

Use case, find all C functions in, let's say src/highlight.c from vim sources:

Regex is \v^\s*(\k+\_s+){1,}\k+\(.{-}\)\_s*\{\s*$
And even though I can find them using regular interactive search (/) and :call search('\v^\s*(\k+\_s+){1,}\k+\(.{-}\)\_s*\{\s*$')
the result of the next call to matchbufline is empty:

    :call matchbufline(bufnr(), '\v^\s*(\k+\_s+){1,}\k+\(.{-}\)\_s*\{\s*$', 1, '$')

Apparently it goes line by line matching the pattern and thus fails.


Screenshot from 2024-02-14 22-56-07.png

--
--
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/e0bfaa44-a1c8-4b4a-9588-54c13ca9ac57n%40googlegroups.com.

No comments: