发现

这个 Find 窗格允许您在用户定义的位置搜索文本文件的内容,并使用高级功能筛选结果。

Spyder Find in Files panel, with search results shown per-file

使用窗格查找

要在“查找”窗格中搜索文本,请在左上角的字段中输入文本,然后按“搜索”按钮。这将允许您在工作目录中查看和浏览搜索文本的所有匹配项。可以展开或折叠搜索结果以查看每个文件中的匹配项。单击匹配项将自动打开文件并突出显示找到文本的行。

Spyder Find pane showing search and going to a file

如果要更改搜索范围,请在 Search in 菜单。您为搜索选择的位置将存储在列表中,以便您将来可以轻松访问它们。要删除所有这些保存的目录,请选择 Clear the list 中的下拉菜单中的选项 Search in 字段。

Spyder Find pane showing chosing new directory and directory stored in the list

选择搜索选项

您可以从多个选项中进行选择,以根据需要启用更广泛或更精细的搜索。

要启用区分大小写(只返回与搜索文本大小写相同的匹配项),请切换 Aa 按钮打开。

Spyder Find pane showing search with case sensitive activated

将搜索字符串解析为 regular expression ,启用 .* 按钮。

Spyder Find pane showing regular expression search

要从搜索中排除某些文件名、扩展名或目录,请单击 Plus 按钮显示窗格的高级选项,然后在 Exclude 文本框。

Spyder Find pane showing search excluding several file-types

最后,要更改显示的匹配数,请选择 Set maximum number of results 选项位于右上角窗格的“选项”菜单下。

Spyder Find pane showing window with maximum results dialog open