Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse find all in one file

In Eclipse (CDT), is there a way to find all occurrences of a string in a single file? I can search the entire workspace easily enough using Ctrl-H, and can do "find-next" using Ctrl-F, but I want to be able to see a list of all matches for just one file.

It would be possible to do by setting up a custom file filter for each file I want to search, but that's very clunky. Eclipse should be able to work out which file I have open and just search that file.

This seems like it should be easy, but I can't find an appropriate option...does it exist?

like image 356
Stefan Avatar asked May 28 '13 08:05

Stefan


1 Answers

Use CTRL+H and switch to File Search as you already mentioned, but set Scope to Selected resources. Now you can either search the current file, or selected multiple files and search all of them

like image 162
moeTi Avatar answered Oct 26 '22 16:10

moeTi