4中的默认代码段

4中的默认代码段

本文介绍了删除XCode 4中的默认代码段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除XCode 4中的一些默认代码段,因为我希望开始的花括号在新行上开始.我尝试了以下操作,但XCode 4似乎不遵守该规则.

I want to delete some of the default code snippets in XCode 4 because I want the beginning curly brace to start on a new line. I tried the following but XCode 4 does not seem to adhere to the rule.

defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict BlockSeparator "\\n"

有什么建议吗?

谢谢.

推荐答案

默认写入"命令对我不起作用.我通过在新行上添加一个带有大括号的新代码片段来解决此问题.下次我键入'if'时,我获得了内置补全,但是由于从下拉列表中选择了我的补全,所以

The "defaults write" commands have not worked for me. I got around this by adding a new code snippet with the beginning curly brace on a new line. The next time I typed 'if' I got the built-in completion but since selecting my completion from the drop-down,

在此处查看有关代码段的更多信息: http://developer.apple.com/library/mac/#documentation/IDEs/Conceptual/Xcode4TransitionGuide/Orientation/Orientation.html#//apple_ref/doc/uid/TP40009984-CH5-SW1

See more on code snippets here: http://developer.apple.com/library/mac/#documentation/IDEs/Conceptual/Xcode4TransitionGuide/Orientation/Orientation.html#//apple_ref/doc/uid/TP40009984-CH5-SW1

还有一点: http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Editing/Editing.html#//apple_ref/doc/uid/TP40010215-CH8-SW2

但不是很深入,我唯一能看到包含可替换文本的方法(例如,"if"代码段中的条件")是通过代码编辑器中的代码段进行复制.

But not very in-depth, the only way I can see to include a replaceable piece of text (e.g. 'conditions' in the 'if' snippet) is by copying from a snippet in the code editor.

这篇关于删除XCode 4中的默认代码段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 02:53