Search code examples
templatesxcode4editing

Eclipse-like editing templates for small pieces of code in Xcode 4


I'm used to using Eclipse and there's a feature I really like and I really think is time saver, the editing template. This is a feature that allows you to pre-write a template piece of code; each time you write the name of it in your source, your template is inserted.

Does that feature or an equivalent exist in Xcode? I tried to Google it and to find it in the settings, but I found nothing.


Solution

  • Look in the documentation under "Creating a custom code snippet". Among other things, it says, "Code snippets let you enter source text with minimum effort. You can drag a standard or custom code snippet into a source file. You can also type a completion shortcut to enter a snippet."