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.
Xcode – shortcut to make a block comment in Xcode
commentsxcode
Related Topic
- Xml – How to comment out a block of tags in XML
- Xcode – How to “add existing frameworks” in Xcode 4
- Powershell – How to comment out code in PowerShell
- Python – way to create multiline comments in Python
- Xcode – How to download Xcode DMG or XIP file
- How to “comment-out” (add comment) in a batch/cmd
- Xcode Command-Slash Shortcut to Comment Only Works Sometimes
- R – CMake: how do you copy private frameworks into the application bundle under OS X
Best Answer
Try command + /.
So, you just highlight the block of code you want to comment out and press those two keys.