Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hide/unhide all comments in xcode

Tags:

comments

xcode

Is there a way to hide/unhide all comments in xcode source files?

This would be very helpful when working with code that has way too many comments added.

like image 517
lajos Avatar asked May 27 '09 05:05

lajos


People also ask

How do I comment all lines in Xcode?

The answer is actually very simple if you want to comment a continuous sequence of lines. Select the consecutive lines, then simply press ⌘ / .

How do you add comments in Xcode?

Begin a comment with a forward slash and two asterisks ( /** ), and terminate it with an asterisk and a forward slash ( */ ). Content you add in between becomes the documentation. Otherwise, use the Code Actions menu in Xcode to generate a template that you fill out.

How do I comment out a highlighted code in Xcode?

Cmd + Shift + 7 will comment the selected lines.


2 Answers

You can use fold/unfold to hide/show comments using ⌃⇧⌘↑ and ⌃⇧⌘↓. This is also accessible through View --> Code Folding --> Fold/Unfold Comment Blocks.

like image 55
Derek Swingley Avatar answered Sep 27 '22 19:09

Derek Swingley


Try: Ctrl + Command + Shift + Left Or Ctrl + Command + Left

like image 40
evya Avatar answered Sep 27 '22 18:09

evya