Determining the Shortcut for a Code Snippet
- Steps
In the Code Snippet library, select the snippet for which you want to use a shortcut.
Click Edit.
In the Completion Shortcut field, note the shortcut or add one.
Click Done.

Enter source code text with minimum effort by typing a completion shortcut for a code snippet.
Code snippets let you quickly enter source code. You can drag a snippet from the Code Snippet library into a source file. Or, for maximum efficiency, type a snippet shortcut in the text of your source code, then press Esc and then Return to enter the snippet. In most cases, when you begin typing the snippet’s completion shortcut, Xcode suggests it, so you need only accept it by pressing Return. Both standard and custom code snippets support completion shortcuts. You can edit the shortcut for a custom snippet.
The screenshot shows a completion shortcut highlighted.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-01-09)