是否有“在文件中查找”选项? Eclipse 中的快捷方式?

发布于 2024-12-07 04:50:13 字数 307 浏览 3 评论 0原文

Eclipse 中是否有像 Visual Studio 中那样的“在文件中查找”快捷方式(Ctrl+Shift+F)?

我查看了这两个列表:

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

随心而道 2024-12-14 04:50:13

选择工作区并按 Ctrl-H

选择哪个对话框取决于在 Project Explorer 视图中选择的文件类型。例如,如果您选择了 .js 文件并按 Ctrl-H,它将打开一个对话框,其中选择了“Javascript 搜索”选项卡。如果要搜索所有文件,可以按 Ctrl-F7 选择 Project Explorer 视图,使用箭头键选择文件上方的文件夹,然后按 Ctrl-H(或选择一个文件,其类型不会触发自定义对话框选项卡)。

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).

单挑你×的.吻 2024-12-14 04:50:13

感谢其他两个解决方案,但这是我正在寻找的完整答案,它解决了我如何搜索文件中的所有文本,而不仅仅是类型、方法、包、构造函数和字段:

  • Ctrl+H 打开“搜索”对话框中的
  • “文件搜索”选项卡,如果没有出现,请展开窗口或使用向左/向右箭头
  • 在文本中键入搜索
  • 使用“* .java”,就我而言,因为我我正在使用 Java 进行编码,要仅搜索这些文件,
  • 请单击“搜索”

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"
染年凉城似染瑾 2024-12-14 04:50:13

如果您仅使用文件搜索,则可以在搜索面板(自定义...左下角)中禁用所有其他搜索。然后每次按 Ctrl+H 时都会进行文件搜索

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

最单纯的乌龟 2024-12-14 04:50:13
  • Ctrl+H 打开搜索框
  • 单击左下角的“自定义” 选中
  • “记住上次使用的页面”
  • 单击“确定”。
  • 选择文件搜索选项卡并进行搜索
  • 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
魂ガ小子 2024-12-14 04:50:13

如果您想使用特定类型的搜索(Java、Javascript ...等),您可以使用 Ctrl+H,这将打开搜索对话框,然后单击“搜索”按钮。

如果您只想搜索整个工作区中出现的所有文本,请单击要搜索的单词(或选择文本),然后按 Ctrl+Alt+G。您将直接获得所有找到的事件,甚至无需使用对话框。

我发现 Ctrl+Alt+G 是最好的解决方案,因为它在不同的相关文件(例如 Java 和 XML,或 Javascript 和 HTML)中显示变量名称,同时仍然具有可用的特定于类型的搜索功能通过 Ctrl+H

您可以将 Ctrl+Alt+G 重新绑定到在项目或工作集中而不是整个工作区中查找文本(如果这对您更有吸引力)。

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.

木格 2024-12-14 04:50:13

是的,Eclipse 有搜索快捷键,当我们用关键字搜索特定的 html、jsp、xml、java、properties、class、jar、搜索文件时,这些快捷键非常有用。

  • Ctrl+H 用于打开标签,可以选择文件类型 Remote Search、File search、git search、java search、javascript search 等
  • Ctrl +Shift+R 用于搜索当前项目中的所有文件
  • Ctrl+Shift+T 用于搜索工作区中的所有文件

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
很酷不放纵 2024-12-14 04:50:13

Ctrl + H 。然后选择“文件搜索”选项卡。

其他搜索选项

搜索资源按 Ctrl + Shift + R

搜索 Java 类型按 Ctrl + Shift + T

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

樱花坊 2024-12-14 04:50:13

来源: Eclipse:默认为“文件”搜索对话框中的“搜索”选项卡

  • 转至您的键绑定 Windows >首选项>一般>按键
  • 解除“打开搜索对话框”
  • 过滤/搜索“文件搜索”的快捷键“Ctrl+H”,并在此处使用“Ctrl+H”。

Source: Eclipse: Default to "File Search" Tab in Search Dialog

  • Go to your key bindings Windows > Preferences > General > Keys
  • Unbind the Shorcut "Ctrl+H" for the "Open Search Dialog"
  • Filter/Search for "File Search" and use the "Ctrl+H" here instead.
陈年往事 2024-12-14 04:50:13

我相信添加插件可以满足您的需求。

如果您安装名为 InstaSearch 的插件,它会使您在当前活动的工作项目中搜索速度更快

它会在您键入时显示结果.

http://marketplace.eclipse.org/content/instasearch#.VIp-_5_PGPQ

I believe adding plug-ins power your needs.

If you install Plug-in named InstaSearch it makes your searching faster inside current active working projects.

It shows the result as you type.

http://marketplace.eclipse.org/content/instasearch#.VIp-_5_PGPQ

画中仙 2024-12-14 04:50:13

正如所指出的,CTRL + H 打开“搜索”对话框。

由于我仅使用“在文件中查找”(并在需要时设置文件名模式),因此我单击“搜索”对话框底部的“自定义...”按钮。它打开搜索页面选择对话框,我在其中关闭了所有其他选项。

您还可以在同一对话框中单击“记住上次使用的页面”。

As pointed out, CTRL + H opens the Search dialog.

Since I use only Find in Files (and set File name patterns when needed), I clicked on Customize... button on the bottom of the Search dialog. It opens Search Page Selection dialog, where I turned off all other options.

You can also click on Remember last used page in the same dialog.

倾城月光淡如水﹏ 2024-12-14 04:50:13

Ctrl+Alt+F(在项目中查找文本 -自定义

注释 - Ctrl+Alt+G 用于在工作区中查找文本,而不是在项目中

如何自定义此键

窗口->首选项->常规->按键->搜索“在项目中查找文本”->在绑定中键入“Ctrl+Alt+F”->应用

注释 - 如果开发人员同时处理多个项目,这将很有帮助。

Ctrl+Alt+F (Find Text in Project -Customized Key)

Note - Ctrl+Alt+G is for Find text in a workspace, not in a project

How to customize this Key

Window->Preferance->General->Keys-> Search for 'Find Text in Project'->Type 'Ctrl+Alt+F' in binding ->Apply

Note - this will be helpful if the developer is working on multiple project simultaneously.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文