Xcode 3.2 在选定文本中查找和替换

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1656625/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:12:06  来源:igfitidea点击:

Xcode 3.2 find and replace in selected text

cocoacocoa-touchxcode

提问by RunLoop

Is it possible to find and replace in selected text in Snow Leopard Xcode 3.2? There always use to be an option for selected text. Really frustrating. Thanks.

是否可以在 Snow Leopard Xcode 3.2 中的选定文本中查找和替换?总是有一个选择文本的选项。真令人沮丧。谢谢。

回答by No Surprises

Yeah, but it's a lot less obvious now. If you have the "Find" bar up, change the first dropdown menu to "Find & Replace". Then, if you hold option, the "Replace All" button turns into an "In Selection" button.

是的,但现在已经不那么明显了。如果您有“查找”栏,请将第一个下拉菜单更改为“查找和替换”。然后,如果您按住选项,“全部替换”按钮将变成“选择中”按钮。

回答by Aidan

You can press Command+Ctrl+F to bring up directly the Find & Replace bar, and press Escape to remove it. I don't think there's anyway to activate the "Replace All" button using the keyboard, but then again there never was afaik.

您可以按 Command+Ctrl+F 直接调出查找和替换栏,然后按 Escape 将其删除。我不认为无论如何都可以使用键盘激活“全部替换”按钮,但是再一次从来没有afaik。

回答by Travis M.

In XCode 5 and earlier you can highlight a word and hit CMD+CTRL+E and then simply edit the word in line and it applies your edit to all occurrences of that word in the document.

在 XCode 5 及更早版本中,您可以突出显示一个单词并按 CMD+CTRL+E,然后简单地在线编辑该单词,它会将您的编辑应用于文档中所有出现的该单词。

回答by Suragch

Sometimes an image helps make things a little easier to grasp quickly. So this is to supplement the chosen answer.

有时,图像有助于使事情更容易快速掌握。所以这是对所选答案的补充。

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

And holding down Option:

并按住Option

enter image description here

在此处输入图片说明