arberg
arberg

Reputation: 4265

How select the rest of the word in incremental search in Eclipse?

When in incremental search mode in Eclipse, is there a way to select the rest of the word?

For example, suppose I want to find the word “handleReservationGranted”. I type Ctrl + F to enter incremental search mode, and start typing the letters “han”. Now suppose I have found the beginning of “handleReservationGranted”. In my search box I have “han”, but I would now like to be able to select the rest of the word, so that the search box contains “handleReservationGranted” instead of “han”.

In Xemacs, I can type Ctrl + S, type “han”, and then type Ctrl + W. Now my search term is “handleReservationGranted”, and not “han”. So now if I press Ctrl + S, I find the next occurrence of “handleReservationGranted”.

I frequently prefer the incremental search over the search dialog, as the search dialog takes too much space on my screen, and most annoying it frequently hides the found matches. I am using Eclipse Galileo (3.5.2).

Ctrl + Shift + L gives me the list of possible shortcuts in the given context, but none seems to fit what I'm looking for.

Upvotes: 2

Views: 1156

Answers (1)

javilaureano
javilaureano

Reputation: 846

Instead of using Ctrl + F you can use Ctrl + J (no dialog appears).

Then you start typing the word and, when you find it, you'll have te beginning selected. Now you only have to do Ctrl + Shift + to select the rest of the word.

With the word selected, if you press Ctrl + K it searches for the next ocurrence (Ctrl + Shift + K the previous).

Note: I'm using Eclipse 3.4 but I suppose in 3.5 it works the same way. If it doesn't you can press Ctrl + Shift + L in the editor window (not in the search dialog) and look for 'Incremental Find'.

Upvotes: 6

Related Questions