Xcode-在所有文件中搜索文本

有没有一种方法可以搜索所有的 Xcode 项目文件?我知道我可以用 finder 在文件中找到一些文本,但是用 Xcode 找到一些东西将会非常有帮助。当我按 cmd + f我只能 找到找到并替换在当前显示文件。

75035 次浏览

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)

cmd + shift + f opens it too.

Use cmd + shift + f for complete Xcode search.

Use Command + 3 a minimum keyboard shortcut or Command + Shift + f

In find use: Find > Text > Containing

To do it simply from the UI, with a click

By default, this will be searching through the entire project searching for any files containing the specific string you entered.

enter image description here

From this point, you can start doing more stuffs like replace all, etc, like this

enter image description here

Right Click on any text and select 'Find Selected Text in Workspace'

In my experience, cmd + shift + f requires cmd + c before hand to populate the search term. So, my go to search for text in all files is to do the above.

cmd + shift + f

then press return key of you keyboard.