Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a "Find in Files" shortcut in Eclipse?

Is there a "Find in Files" shortcut in Eclipse, as there is in Visual Studio (Ctrl+Shift+F)?

I have looked in these two lists:

  • Eclipse Shortcuts
  • "Show All Shortcuts" shortcut: Ctrl+Shift+L.

Thanks.

like image 954
Xonatron Avatar asked Sep 27 '11 13:09

Xonatron


People also ask

How do I search inside a file in Eclipse?

If you want to search in files: Ctrl + H and then choose tab File Search . If you want to search for resources: Ctrl + Shift + R . If you want to search for Java types: Ctrl + Shift + T . If you want more shortcut keys: Ctrl + Shift + L .

What is Ctrl G in Eclipse?

Search – Eclipse Shortcuts CTRL SHIFT G – Search for current cursor positioned word reference in workspace. CTRL H – Java search in workspace.

What does Ctrl k do in Eclipse?

In Eclipse, if the cursor is over a word and you press Ctrl + K you will jump to the next occurrence of that word in the file.


2 Answers

select workspace and press Ctrl-H

Which dialog is selected, depends on which file type is selected in the Project Explorer view. For example, if you selected a .js file and press Ctrl-H, it will bring up the dialog with the "Javascript Search" tab selected. If you want to search all files, you can press Ctrl-F7 to select the Project Explorer view, use arrow keys to select a folder above your files, then press Ctrl-H (or select a file, whose type doesn't trigger a custom dialog tab).

like image 92
Gordon Glas Avatar answered Sep 18 '22 18:09

Gordon Glas


Thanks to the other two solutions, but here is the complete answer I was looking for, which addresses how I search all the text within the files, not just types, methods, packages, constructors, and fields:

  • Ctrl+H to open the "Search" dialog box
  • "File Search" tab, if it does not appear, expand the window or use the left/right arrows
  • type in the text to search for
  • Use "*.java", in my case since I am coding in Java, to search just these files
  • Click "Search"
like image 44
Xonatron Avatar answered Sep 19 '22 18:09

Xonatron