10

In Eclipse you can hit Ctrl + J to use Incremental Find which is awesome. But if you start out half way down the page, and try to find something in the top half it won't find it because it doesn't wrap around, it stops at the bottom of the page. So I often end up jumping to the top of the page, just to incremental find to the middle.

Is there a way to force incremental find to wrap around the bottom of the page?

Note: I realize there is also Ctrl + Shift + J to do a reverse incremental find, but that has the same limitations.

jb.
  • 9,921
  • 12
  • 54
  • 90
  • Penghe's answer should be accepted IMO, having to hit Ctrl+J again *after* incremental search makes incremental search useless (and pretty much like normal find...) because half the time I'm searching, I'm using the 'incremental' aspect to find what I'm looking for. – Joe Sep 12 '13 at 00:30
  • @Joe, IMO, it's kind of a matter of preference, my answer you hit Ctrl+J, enter search query, Ctrl+J again. Penghe's answer you hit Ctrl+F, enter search query, Esc. So it's another Ctrl+J or an Esc. Personally, I can hit Ctrl+J faster then Esc. Also, same thing I said to Evgeni, if you can find a better way to do it, please let me know and I'll reward with rep. – jb. Sep 12 '13 at 01:50
  • 1
    I agree that the method of searching or shortcut used is a matter of preference. However, my point is that we are talking about *incremental* search. Hitting Ctrl+J again to find the full search string is not *incremental*, it's just a normal find string. What I like about incremental search is that the editor moves up/down as the search term is refined (for someone trying to guess what they're looking for and using the real time editor feedback to help that process). By taking away this process of realtime feedback, it makes the method the same as Ctrl+F, Esc with diff keymaps. – Joe Sep 12 '13 at 03:29

3 Answers3

7

So I finally figured out that if you hit Ctrl + J the first time, it won't wrap so it won't find the top half. If you hit Ctrl + J a second time it will wrap and search the entire page.

Just hit Ctrl + J again.

jb.
  • 9,921
  • 12
  • 54
  • 90
  • 1
    This is not ideal, because as you type in a string, it will tell you "not found" even if there is a match before the cursor. There should be a way to get it to wrap by default. – Evgeni Sergeev Oct 25 '12 at 08:45
  • 1
    @EvgeniSergeev You are completely correct, "not ideal" is exactly how I would describe it too. If you can figure out a way to make it wrap on the first try, I'd love to hear it (and reward you with rep). – jb. Oct 26 '12 at 01:25
3

A close but not direct solution is to use the old way of Ctrl + F, and check the "Wrap search" and "Incremental" options.

Penghe Geng
  • 13,286
  • 5
  • 31
  • 40
0

There is a plugin for better incremental search that does wrap around by default, I use it everyday.

https://code.google.com/p/eclipse-glance/

ilcavero
  • 3,012
  • 1
  • 31
  • 27