J
J
Joss Nix2020-03-10 18:01:29
vim
Joss Nix, 2020-03-10 18:01:29

How to see the number of found elements?

Is it possible to configure vim to display the number of items found when searching? And if so, how?

PS
If this can be done without a plugin, then it's generally cool.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2020-03-11
@Jossnix

Use the g and n flags in the replace command and Vim will tell you how many times the pattern has been encountered. For example:
:%s/someth//ng
See also::h :s_flags

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question