什么是在Xcode上管理代码片段的最佳方法?

时间:2021-05-01 01:51:57

I have fallen in love with visual studio's code snippets toolkit. Is there anything similar on Xcode?

我已经爱上了visual studio的代码片段工具包。 Xcode上有什么类似的东西吗?

5 个解决方案

#1


Check out any external tool for saving and managing snippets like Snippets. It's coolest Mac app for managing snippets I've seen before.

查看用于保存和管理代码段(如代码段)的任何外部工具。它是用于管理我之前见过的片段的最酷的Mac应用程序。

#2


Check out this brilliant tip on how you can use code snippets in XCode 4 and also auto complete it. works like magic

查看有关如何在XCode 4中使用代码片段以及自动完成它的精彩提示。像魔术一样工作

#3


You can also take a loot at this question which is about similar issues with XCode 3 (code templates, code completion, and more).

你也可以在这个问题上获取一个与XCode 3类似问题(代码模板,代码完成等)的问题。

#4


Of course there are. They are under "Edit -> Insert Text Macro".

当然有。它们位于“编辑 - >插入文本宏”下。

Or you can simply start typing 'if<ctrl+.>' and this will be expanded into the full if statemenet.

或者你可以简单地开始输入'if ',这将被扩展为完整的if statemenet。

#5


Xcode 4 has support for code snippets.

Xcode 4支持代码片段。

#1


Check out any external tool for saving and managing snippets like Snippets. It's coolest Mac app for managing snippets I've seen before.

查看用于保存和管理代码段(如代码段)的任何外部工具。它是用于管理我之前见过的片段的最酷的Mac应用程序。

#2


Check out this brilliant tip on how you can use code snippets in XCode 4 and also auto complete it. works like magic

查看有关如何在XCode 4中使用代码片段以及自动完成它的精彩提示。像魔术一样工作

#3


You can also take a loot at this question which is about similar issues with XCode 3 (code templates, code completion, and more).

你也可以在这个问题上获取一个与XCode 3类似问题(代码模板,代码完成等)的问题。

#4


Of course there are. They are under "Edit -> Insert Text Macro".

当然有。它们位于“编辑 - >插入文本宏”下。

Or you can simply start typing 'if<ctrl+.>' and this will be expanded into the full if statemenet.

或者你可以简单地开始输入'if ',这将被扩展为完整的if statemenet。

#5


Xcode 4 has support for code snippets.

Xcode 4支持代码片段。