Xcode - 在所有文件中搜索文本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10583099/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode - search text in all files
提问by Jakub
Is there a way to search through all Xcode project files? I know that I can find some text inside file with finder, but finding something with Xcode will be very helpful. When I press cmd+fI can only findor find and replacein current display file.
有没有办法搜索所有 Xcode 项目文件?我知道我可以使用 finder 在文件中找到一些文本,但是使用 Xcode 查找某些内容会非常有帮助。当我按cmd+ 时,f我只能在当前显示文件中查找或查找和替换。
回答by rishi
Use cmd + shift+ ffor complete Xcode search.
使用cmd + shift+f完整的Xcode搜索。
回答by Tikkes
On the left hand side of the editor you have a magnifying glass. There's a search box there. That should do the trick. (it's called the search navigator
)
在编辑器的左侧,您有一个放大镜。那里有一个搜索框。这应该够了吧。(它被称为search navigator
)
cmd + shift + f
opens it too.
cmd + shift + f
也打开。
回答by Fangming
To do it simply from the UI, with a click
只需从 UI 执行此操作,只需单击
By default, this will be searching through the entire project searching for any files containing the specific string you entered.
默认情况下,这将在整个项目中搜索包含您输入的特定字符串的任何文件。
From this point, you can start doing more stuffs like replace all, etc, like this
从这一点开始,你可以开始做更多的事情,比如全部替换等,就像这样
回答by Gobi M
Use Command + 3
a minimum keyboard shortcut
or Command + Shift + f
使用Command + 3
最少的键盘快捷键或Command + Shift + f
回答by Eran
In find use: Find > Text > Containing
在查找中使用:查找 > 文本 > 包含
回答by aaronsti
Right Click on any text and select 'Find Selected Text in Workspace'
右键单击任何文本并选择“在工作区中查找选定的文本”
In my experience, cmd + shift + frequires cmd + cbefore hand to populate the search term. So, my go to search for text in all files is to do the above.
根据我的经验, cmd + shift + f需要事先cmd + c来填充搜索词。所以,我去搜索所有文件中的文本就是做上面的。