1

I'm trying to find something that counts the number of responses when you do a search in a file (using '/'), so you know that you are looking at 3/10 results.

Is there anything like this out there? Perhaps an integration with airline?

SibiCoder
  • 1,396
  • 10
  • 21

2 Answers2

2
:vim foo %

does just that:

(1 of 32): <the line containing the first match>

You can also do:

:%s/foo//n

which would output something like:

32 matches on 32 lines

Note that the first one only works reliably on a saved buffer.

romainl
  • 186,200
  • 21
  • 280
  • 313
1

try this plugin https://github.com/henrik/vim-indexed-search
it shows "Match 123 of 456 /search term/" in Vim searches

Ever
  • 1,164
  • 1
  • 9
  • 13