Not.
Best to use ;{ /* Comments */ }() . This will not work anywhere except on the playground, main.swift or inside a function / method (this is permitted in any case).
There are also comments: do { /* Comments */ } , which can also be embedded if the prefix ;
This will allow you to safely fold / expand embedded as well as multi-line blocks ... Problems arise when you are in logical blocks, for example, if/else .. You cannot put a “folding” comment AFTER closing the closing if bracket, and then before else :
Does not work:
if someBool == false { return } ;{}() else { print("is true!") }
It's ugly, hell, and a good reason to use AppCode next to Xcode.
We are already on the XC8, and right now it's just ridiculous, and refactoring is not available.
AppCode supports many of the missing features in Xcode, so it is a good tool for working in an adjacent space or window. You can also use VisualStudio (bootcamp / virtualbox or a second computer) ...
Other text editors can also support this (Vim, Notepad ++), but I have not used them for much.
source share