Is there a “Find in Files” shortcut in Eclipse?

2019-01-31 22:08发布

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:

Thanks.

8条回答
放我归山
2楼-- · 2019-01-31 22:39

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"
查看更多
3楼-- · 2019-01-31 22:39

If you are using only the File Search, you can Disable all other Searches in the Search Panel (Customize... lower left Corner). Then you have the File Search everytime you Press Ctrl+H

查看更多
放荡不羁爱自由
4楼-- · 2019-01-31 22:41

press Ctrl + H . Then choose "File Search" tab.

additional search options

search for resources press Ctrl + Shift + R

search for Java types press Ctrl + Shift + T

查看更多
贪生不怕死
5楼-- · 2019-01-31 22:45
  • Ctrl+H to bring up the search box
  • Click 'Customize' in the lower left
  • Checkmark 'Remember last used page'
  • Click OK.
  • Select the file search tab and do a search
查看更多
放荡不羁爱自由
6楼-- · 2019-01-31 22:57

If you want to use the type-specific search (Java, Javascript ...etc) you can use Ctrl+H, which opens the search dialog, then click the Search button.

If you simply want to search for all text occurrences in the whole the workspace click the word (or select the text) you want to search then hit Ctrl+Alt+G. You will directly get all the found occurrences without even using a dialog box.

I find Ctrl+Alt+G is the best solution because it shows the variable name in different by related files (e.g. Java and XML, or Javascript and HTML) while still having the type-specific search feature available through Ctrl+H

You can rebind the Ctrl+Alt+G to finding text in a project or a working set instead of the whole workspace if that's more appealing to you.

查看更多
不美不萌又怎样
7楼-- · 2019-01-31 22:57

Yes, there is shortcuts for searching Eclipse, these shortcuts are very useful when we search for particular html, jsp , xml, java, properties ,class, jar,search file with keywords.

  • Ctrl+H is used open Tag, in that you can select type of file Remote Search, File search, git search, java search, javascript search , etc
  • Ctrl+Shift+R is used to search all files in the current project
  • Ctrl+Shift+T is used to search all files in the workspace
查看更多
登录 后发表回答