When using swiper for search, it only shows the number of matching lines. How can I view the number of matches?


2 Answers 2



"Please test swiper-isearch. It's no longer line-based like swiper, which makes it display the total number of matches. It also fixes the slow startup of swiper"

(setq ivy-display-style 'fancy
        ivy-count-format "(%d/%d) " ; this is what you want
        ivy-initial-inputs-alist nil ; remove initial ^ input.
        ivy-extra-directories nil ; remove . and .. directory.)

This is from the :init of my (use-package swiper ...) declaration.

  • 3
    ivy-count-format shows the current out of the total number of matching lines, not substrings. This does not do what OP is asking for.
    – Basil
    Commented Mar 21, 2018 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.