2

I switched to helm-occur for searching within buffers. However, I can't help missing two of the nice features of isearch:

  1. isearch remembers the position where it was invoked in a buffer; helm-occur doesn't: when typing a search query, the focus is on the first match of the buffer overall, not on the first match after the cursor position in the buffer.
  2. When typing C-s within isearch, at first the last search query is reactivated, and then, upon further uses of C-s, it cycles through all the matches in a buffer. On the contrary, with helm-occur, I have to first reactivate the last search query with M-p, and then do the browsing with some third key binding, e.g. <down>.

How can I make helm-occur act just like isearch in these two respects?

  • As you can see, it's called "helm-occur", not "helm-isearch". helm-occur is an "interactive" (I mean you can view results as you type) version of M-x occur, so it always searches the whole buffer. – xuchunyang Nov 9 '16 at 5:02
  • Maybe you can give "swiper" a try, it might do what you want. Simply type C-h P swiper to learn about it. – xuchunyang Nov 9 '16 at 5:06
  • @xuchunyang So you are sure that one cannot change this? Thanks for hinting at swiper. I'm already playing around with helm-swoop which seems to resolve the two issues for me. – Timm Nov 9 '16 at 6:37
  • I don't think that's not possible, but it should be easier and better to simply pick up another tool. – xuchunyang Nov 9 '16 at 6:51
  • 1
    You can use helm-resume to bring up the helm-occur window at the occurrence you previously selected; this allows you to go to the next occurrence. – Tianxiang Xiong Nov 12 '16 at 2:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.