Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling Code Folding Bar in Xcode

Tags:

People also ask

How do I enable code folding in Xcode?

If you want to fold / unfold specific blocks of code, since Xcode 7, you have to enable that. Go to Xcode > Preferences > Text Editing > and check 'Code folding ribbon'. (No idea why they disabled this useful feature by default.)

Can you collapse code in Xcode?

There are other methods of collapsing code of course: to collapse all methods, hit SHIFT + OPTION + CMD + LEFT CURSOR. Likewise, to open all methods, use SHIFT + OPTION + CMD + RIGHT CURSOR. To open a single method, you can also click those little three dots in the yellow brackets.


How to enable the code folding bar next to the line numbers?

I googled "code folding Mac"; it's all about triggering code folding and unfolding, but nothing about enabling the bar.

I have tried using Editor -> Code Folding -> Fold/Unfold to fold and unfold codes, but I don't have the vertical bar there next to the line numbers; so, I have the button to click to fold and unfold.

How can I enable that bar?

Please see image here here.