Vim: make search_status() a vim function to get search match index

Created on 12 Feb 2020  路  3Comments  路  Source: vim/vim

Is your feature request related something that is currently hard to do? Please describe.
https://github.com/vim/vim/issues/453 introduces the possibility to print match index as a _message_.
However, I'd like to use it directly in my statusline in order to make it easier to read when editing in a split buffer located at the top of the screen.

Describe the solution you'd like
Would it be possible to make search_status() a vim function returning [idx,total]?

enhancement

Most helpful comment

There is an item in the todo list:

Patch to provide search stats in a variable, so that it can be used in the
statusline. (Fujiwara Takuya, #4446)

And the PR #4446 provides a searchcount() function which can be used to access this information.

All 3 comments

There is an item in the todo list:

Patch to provide search stats in a variable, so that it can be used in the
statusline. (Fujiwara Takuya, #4446)

And the PR #4446 provides a searchcount() function which can be used to access this information.

Yes, I proposed the PR.
Now I found it has conflicted with current master. I will fix it.

But @brammool seems currently working on vim9 script a lot and other new features has not been included recently.
It is a tough work, so I'm just waiting and hoping the stable release ... ;)

closing for #4446

Was this page helpful?
0 / 5 - 0 ratings