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.

2 Answers 2

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
3
  • 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, 2011 at 3:51
  • This is great. But it would be nice to limit the search to the current file without having to type out the filename. Nov 15, 2016 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. Nov 15, 2016 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.