I know you can comment out a whole section of code like so:
/*
line of code
line of code
line of code
*/
But if you already have a /* … */ section in the code that you are trying to comment, then the */ end of a comment block will close the “greater” comment block I am trying to create.
Example:
/* wanting to comment this big section out
line of code
line of code
line of code
line of code
line of code
line of code
/* this section was already commented out before
line of code
line of code
line of code
*/ this section was already commented out before
line of code
line of code
line of code
line of code
line of code
*/ this last part doesn't get commented out, because the comment stops at previous */
Obviously this isn’t a huge big deal, it is not stopping me from getting an app to work properly, but I’m just wondering if there might be some way of commenting out a larger section of code, even if there are already comment blocks in that code.
Highlight the code you want commented out and press “Command” + “/”