4

Here's a feature I always wanted: I have two buffers opened side-by-side and I'd like to be able to start an incremental search in one of those buffers, but in a way which highlights results in both buffers.

This would be extra useful to make sure I didn't make a typo - it's sometimes hard for me to be sure just by looking at the text. Alternatively, something like idle highlight but for all visible buffers would work as well.

Is there a package for that? Can it be done?

2
  • Try multi-occur or helm-multi-swoop as a workaround while you don't get an answer.
    – Daniel
    Aug 8, 2018 at 10:14
  • Additionally if you have swiper/ivy, swiper-all searches all buffers and has a nice preview for each result similar to helm.
    – Greth
    Aug 14, 2018 at 5:57

2 Answers 2

2
  • You can search multiple buffers using ordinary Isearch (commands multi-isearch-buffers and multi-isearch-buffers-regexp. But it searches them one at a time.

  • If you use Icicles then you can use Icicles search to search multiple buffers (or bookmarks or files) at the same time, which means highlighting them all at the same time.

2
  • To help out, the commands are: multi-isearch-buffers or multi-isearch-buffers-regexp. You have to manually select each buffer to search so that might be a down side.
    – Greth
    Aug 14, 2018 at 5:56
  • @Greth: Mentioned the Isearch commands for multi-search. Thx.
    – Drew
    Aug 28, 2018 at 4:23
1

I couldn't find a solution that worked exactly as I wanted. So I made a thing https://github.com/ignacy/idle-highlight-in-visible-buffers-mode

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.