在 Sublime Text 3 中搜索项目中的所有文件 [英] Search in all files in a project in Sublime Text 3

查看:65
本文介绍了在 Sublime Text 3 中搜索项目中的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 Sublime Text 3 的项目内的所有文件中搜索字符串?字符串不是方法.

Is there a way to search for a string in all files inside a project in Sublime Text 3? The string is not a method.

推荐答案

您可以使用 FindFind in files 搜索目录.这也包括所有打开的标签.

You can search a directory using FindFind in files. This also includes all opened tabs.

键盘快捷键是 Ctrl+F 在非 Mac(普通)键盘上,和 +F 在 Mac 上.

The keyboard shortcut is Ctrl+F on non-Mac (regular) keyboards, and +F on a Mac.

您将看到三个框:FindWhereReplace.这是一个常规的 Find/Find-replace 搜索,其中 Where 指定要搜索的文件或目录.例如,我经常使用文件名或 . 来搜索当前目录.在 Where 字段中还可以使用一些特殊的结构:

You'll be presented with three boxes: Find, Where and Replace. It's a regular Find/Find-replace search where Where specifies a file or directory to search. I for example often use a file name or . for searching the current directory. There are also a few special constructs that can be used within the Where field:

<project>,<current file>,<open files>,<open folders>,-*.doc,*.txt

请注意,这些不是占位符,您需要逐字输入.它们中的大多数都是不言自明的(例如,-*.doc 不包括带有 .doc 扩展名的文件).

Note that these are not placeholders, you type these verbatim. Most of them are self-explanatory (e.g. -*.doc excludes files with a .doc extension).

按右侧的 ... 将显示所有可用选项.

Pressing the ... to the right will present you with all available options.

搜索后,您将看到一个查找结果 页面,其中包含所有匹配的结果.要从中跳转到特定的行和文件,您只需双击一行.

After searching you'll be presented with a Find results page with all of your matching results. To jump to specific lines and files from it you simply double-click on a line.

这篇关于在 Sublime Text 3 中搜索项目中的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆