3

I use swiper package to search and to navigate and I use C-n & C-p to search next and previous items. However, this doesn't go through the search items on the same line even though they are highlighted. I think it only cycles through the first items per given line.

Is there a way to move pointers to all search items even if they are on the same line?

I tries looking around for answers but was unsuccessful.

Any suggestions would be much appreciated.

1 Answer 1

6

Press C-' (swiper-avy) to select any visible candidate. Even if there are many candidates on the same line.

9
  • 2
    Note that this default key binding will probably not work when running Emacs in some terminal emulators. See also unix.stackexchange.com/a/161725/230197. Commented May 8, 2017 at 14:41
  • 1
    Wow this is really excellent thank you abo-abo. But I would still be able to search for the 'next' search item in line like the default emacs search C-s if possible. Do you know if this possible? Commented May 8, 2017 at 17:04
  • 1
    swiper-all is more similar to isearch in this respect. swiper is line-based, with all advantages and disadvantages it brings. Commented May 9, 2017 at 8:38
  • Thanks abo-abo swiper-all seems very close to what I want. It seems to require a minimum of 3 characters to search. Is there a way to change the setting to have no such minimum requirement? Commented May 9, 2017 at 20:28
  • It's not reasonable. Without the limit, you'll just get the content of all your open buffers. Which is very slow. Commented May 10, 2017 at 9:58

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.