Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

readme additions regarding context lists

  • Loading branch information...
commit 78640226721ecd4d5274066561f47d2bcc24ff25 1 parent 54b0050
Marc Liyanage authored

Showing 2 changed files with 9 additions and 2 deletions. Show diff stats Hide diff stats

  1. +1 1  MyMacros.xctxtmacro
  2. +8 1 README.md
2  MyMacros.xctxtmacro
@@ -118,7 +118,7 @@
118 118 IsMenuItem = NO;
119 119 BasedOn = objc;
120 120 OnlyAtBOL = YES;
121   - TextString = "$(Declaration)$(BlockSeparator)\n{\n\t<#!statements!#>\n}";
  121 + TextString = "$(Declaration)\n{\n\t<#!statements!#>\n}";
122 122 IncludeContexts = ( "xcode.lang.objc.implementation" );
123 123 ExcludeContexts = ( "xcode.lang.objc.block" );
124 124 },
9 README.md
Source Rendered
@@ -69,7 +69,14 @@ The second step is to start writing (and hopefully sharing) your own macros:
69 69 `Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources/`.
70 70 * The Xcode user defaults also influence the macros, specifically the whitespace.
71 71 These defaults are documented [here](http://developer.apple.com/mac/library/documentation/DeveloperTools/Reference/XcodeUserDefaultRef/100-Xcode_User_Defaults/UserDefaultRef.html#//apple_ref/doc/uid/TP40005535-CH3-SW40).
72   -
  72 +* Completion prefixes are more useful when you limit the macros to the
  73 + source code contexts in which they make sense. You do that by specifying
  74 + appropriate context include and exclude lists for each macro. To find out
  75 + what contexts are active at a particular source code location, I use
  76 + a one-line shell script with the command `echo $XCSourceContext`
  77 + that I added as an Xcode user script. I place the cursor in the location
  78 + I’m interested in and run the script, which inserts the list of context
  79 + identifiers.
73 80
74 81 About the Macros
75 82 ================

0 comments on commit 7864022

Please sign in to comment.
Something went wrong with that request. Please try again.