8

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?

4

1 回答 1

6

使用CTRL+H并切换到File Search您已经提到的,但设置ScopeSelected resources. 现在您可以搜索当前文件,也可以选择多个文件并搜索所有文件

于 2013-05-28T08:36:27.907 回答