1

When searching in iTerm2, some kind of of fancy live highlighting thing seems to kick in even before you hit enter. When the scrollback buffer has more than a few thousand lines in it, this search mode seems to become unusably slow. It maxes out a CPU at 100% and doesn't actually find anything while it's "thinking", making it impossible to search long scroll buffers. And it never finishes thinking (at least not quickly enough for me to have seen it ever finish).

Even just typing the characters into the search box becomes slow, one character appearing per second.

Is it possible to disable the highlighting (to only highlight the current result) or otherwise speed up search? I'm trying to switch from Terminal.app to iTerm but, as I have discovered, I search a lot.

1

I haven't encountered this particular problem, but I also don't use the built in searching feature very much.

Because of how this is programmed, it does duplicate work. Say you want to search for "set background mode"; as you are typing it searches for "s", then "se", then "set", etc. Using copy and paste for your search term may help a little bit but probably not noticeably.

Alternative 1: Play with iTerm settings

You can find the iTerm 2 scrollback settings in Preferences > Profiles > Terminal > Scrollback Buffer

Mine are set to:

  • [x] Unlimited scrollback
  • [ ] Save lines to scrollback when an app status bar is present
  • [x] Save lines to scrollback in alternate screen mode

Alternative 2: Reduce the size of your scrollback buffer

If you untick "Unlimited scrollback", you can then set a small value for Scrollback Lines. This will reduce the amount to text that have to be searched. It could make your searching more tolerable at the expense of a smaller scrollback.

Alternative 3: Upgrade to the latest version

I'm using iTerm2 Build 2.9.20151111, which is a Beta for 3.0. It operates very well and has additional features over the stable 2.x version.

Alternative 4: Take this question to the developers

This should really be Alternative 1. Truthfully, this question is probably best addressed to the developers of iTerm 2. Don't worry, they don't bite.

The main page is here. You can post questions on their forum or report this on their bug tracker.

  • I posted a bug report, and I might give the 3.0 beta a shot and see how that goes. Thank you! – Alexander Ljungberg Dec 10 '15 at 20:05
0

Well first of all incremental search is a wonderful feature (that I guess you would be using inside vim as well). There is workaround for doing non-incremental search though.

  1. Type the word to be searched on the terminal prompt.
  2. Highlight the word (using mouse or keyboard).
  3. Hit CommandE.
  4. Hit CommandF.
  5. Hit Enter

This should highlight all occurrences the words in one shot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .