如何在 Xcode 中启用索引?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7328041/
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
How to enable indexing in Xcode?
提问by rowdyruckus
I disabled indexing to get speed back, it worked! Now I upgraded my RAM from 4gb to 8gb and would like to give it a try again.
我禁用了索引以恢复速度,它起作用了!现在我将 RAM 从 4gb 升级到 8gb,并想再试一次。
I used this code in terminal the 1st time:
我第一次在终端中使用了此代码:
defaults write com.apple.dt.XCode IDEIndexDisable 1
I tried this code and restarted, didn't work:
我试过这段代码并重新启动,没有用:
defaults write com.apple.dt.XCode IDEIndexEnable 1
Anyone know another command?
有人知道另一个命令吗?
回答by Steven Fisher
Defaults are a name-value store per domain. The setting's domain here is com.apple.dt.XCode
. The setting's name is IDEIndexDisable
. You set this to 1. To undo this, you need to remove the setting, not add another one with a different name.
默认值是每个域的名称-值存储。这里设置的域是com.apple.dt.XCode
. 设置的名称是IDEIndexDisable
。您将其设置为1。要撤消此操作,您需要删除该设置,而不是添加另一个名称不同的设置。
Based on the command you entered the first time, use this:
根据您第一次输入的命令,使用以下命令:
defaults delete com.apple.dt.Xcode IDEIndexDisable
While you're at it, you should delete the key you added as well:
在此过程中,您还应该删除添加的密钥:
defaults delete com.apple.dt.Xcode IDEIndexEnable
回答by A_B
Instead of deleting the written setting, just toggling its value worked for me. Enter the following in a terminal window:
而不是删除书面设置,只是切换它的值对我有用。在终端窗口中输入以下内容:
defaults write com.apple.dt.XCode IDEIndexDisable 0