create custom code completion macro in xcode 6.1

2019-07-28 19:06发布

问题:

How do i create a custom code completion macro in xcode 6.1

answer to How to create custom "Text Macros" in Xcode? does not seems to work as "Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources" does not exist anymore.

回答1:

I have just been searching for this too, and I found the solution.

  • Select the snippet that you want to make the macro with.
  • Drag the selected text to the Snippets Draw.
  • Inside the edit box, add the 'short-cut' that you want to use in the "Completion Shortcut" edit field.
  • Set the required "Completion Scopes", if required. Viola.