Is there a shortcut to make a block comment in Xcode?
UPDATE Xcode 12 / macOS Big Sur:
Currently the Mac App Store version of the BlockComment for Xcode doesn't show up under Xcode > Preferences > Key Bindings. This issue has been resolved and GitHub version can be used instead.
UPDATE June 2017:
Since I was lazy, and didn't fully implement my solution, I searched around and found BlockComment for Xcode, a recently released plugin (June 2017). Don't bother with my solution, this plugin works beautifully, and I highly recommend it.
ORIGINAL ANSWER:
None of the above worked for me on Xcode 7 and 8, so I:
Created Automator service using AppleScript
Make sure "Output replaces selected text" is checked
Enter the following code:
on run {input, parameters}return "/*\n" & (input as string) & "*/"end run
Now you can access that service through Xcode - Services menu, or by right clicking on the selected block of code you wish to comment, or giving it a shortcut under System Preferences.
Now with xCode 8 you can do:
⌥ + ⌘ + /
to auto-generate a doc comment.
Source: https://twitter.com/felix_schwarz/status/774166330161233920