I'm writing ANSI-compatible C code, and hence I can't use the line (//
) comment. I'm using Xcode. In Sublime Text and Eclipse, and I think most other IDEs, there are separate keyboard shortcuts for line comments and block comments (/**/
). However, I don't see that in Xcode - in fact, I don't even see a menu option to add a block comment. Is it simply not supported in Xcode? That would certainly seem to be a lame decision if so.
Try command + /. It works for me.
So, you just highlight the block of code you want to comment out and press those two keys.