views:

72

answers:

1

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.

A: 

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+Rigth_Arrow 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'.

javilaureano
Thx, that's kind of what I was looking for. It is not quite as elegant as in emacs, but it gets the job done. Maybe I can just reconfigure the keys, and be happy
arberg