11

I have been using Eclipse for R and C++. So far I have not been able to find a reliable "find all" function. It seems to be an easy concept, I search for a string such as "rows" and the function should return all occurences of it within the that I currently have open. (Even if it's in all files in my owrkspace, that's fine too.)

However, I have either not understood how to use the "search" functions correctly or they are very buggy.

So my question is how do I search for all occurences of a string in a file in Eclpise?

Adobe Dreamweaver, for example, has been able to do this for years.(Although it's completely unrelated to R and C++)

I would like to view a list of all occurences and then be able to click on a specific occurence to go to it.

power
  • 1,680
  • 3
  • 18
  • 30

2 Answers2

20

After opening Eclipse, (corresponding to a workspace), Press "CTRL + H" anywhere and you can search anything

  • like java files that contain specific "keywords".
  • all occurences within a java file.
  • plugins names etc
Ramandeep Singh
  • 5,063
  • 3
  • 28
  • 34
  • 1
    Figured it out: use Ramandeep Singh's suggestion, BUT select "Regular expression" and use "File Search". Although it searches everything in the workspace, that's still fine. :-) – power Nov 11 '11 at 03:51
  • This is great. But it would be nice to limit the search to the current file without having to type out the filename. – faintsignal Nov 15 '16 at 16:52
  • ...one way is to press CTRL + A (select all) before CTRL + H and selecting Scope "Selected resource". But really "Current file" should be a Scope option. – faintsignal Nov 15 '16 at 17:03
7

Just type "rows" or whatever the search term is somewhere in text, select it (so that it becomes highlighted) then press "Alt+Ctrl+g". This will perform a global search for that term, pretty handy.

dashesy
  • 2,596
  • 3
  • 45
  • 61