Xcode 9: Code folding gone?

Bug reported: 33538078

I can no longer fold long if / while / for loops etc. Code folding ribbon has dissappeared and the editor does not highlight code regions for if / else statements.

It's now impossible to read code or fold away unwanted regions. Ideally we should have regions like Visual Studio / Android Studio / IntelliJ, and cursor region highlighting but even an essential feature as this has now disappeared it seems.

Accepted Reply

>Code folding gone?


Yes, the release notes say this about that:


"The source editor in this beta version of Xcode 9.0 doesn’t support code folding."


So, sure, good to file a bug, but I'd not worry too much until we get a chance to see later/release version.


Replies

In the release notes:



The source editor in this beta version of Xcode 9.0 doesn’t support code folding. (29396003)


>Code folding gone?


Yes, the release notes say this about that:


"The source editor in this beta version of Xcode 9.0 doesn’t support code folding."


So, sure, good to file a bug, but I'd not worry too much until we get a chance to see later/release version.


You can fold code with CMD-click on func and then select fold or put the cursor on func and then CMD-ALT and left arrow to close and right arrow to open.

The new code folding in xcode9 is very painful


When everything is folded, you can't select cut/paste to rearrange, clicking now just expands it.


Also deleting lines between functions deletes the preceding folded chunk.


The prev sidebar ui, folding behavior was nice and far more useful 😟 --

Thats true and code folding simple blocks like if, for, while etc. only work with swift code, not with objective C or c/c++ code !

Forgive my language, but when the **** is the original code foldering coming back?!

It is back in Xcode 10 for C++ .Thank goodness.

Incase you didn't know: code folding for c++ is back in Xcode 10.

Good news. Thanks