Can I create a custom snippet that takes a parameter that is replaced multiple times inside the code?
I tried something like:
<#class#> instanceOf<#class#>;
but it doesn’t replace both class placeholders when I insert the snippet and write over the first parameter.
This is not possible in Xcode 4.x at the time of writing (Sept. 2011).
If you want this feature back in Xcode 4.x, please go to bugreport.apple.com and report a duplicate for this rdar that I just preported:
Here is the rdar reference for duping:
rdar://10071607
And here a copy on OpenRadar:
http://openradar.appspot.com/radar?id=1327411
While you’re at it: Feel free to dupe this rdar as well:
“Xcode 4: snippet functionality regressions”
rdar://9192757
http://openradar.appspot.com/9192757