I was trying to choose a Mac text editor recently; got it down to Atom and Sublime, and then discovered that <i>both</i> of them do code folding wrong. They think it&#x27;s based on indentation, not syntax, so if you try to fold something like:<p><pre><code>  if (something) {
    some code
  &#x2F;&#x2F;commented-out code
    more code
  }
</code></pre>
It folds everything from the opening bracket to the comment, then stops.<p>Both editors have had issues filed over this bug for years, which have been ignored. (<a href="https:&#x2F;&#x2F;github.com&#x2F;atom&#x2F;atom&#x2F;issues&#x2F;3442" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;atom&#x2F;atom&#x2F;issues&#x2F;3442</a>, <a href="https:&#x2F;&#x2F;github.com&#x2F;SublimeTextIssues&#x2F;Core&#x2F;issues&#x2F;101" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;SublimeTextIssues&#x2F;Core&#x2F;issues&#x2F;101</a>)<p>I eventually decided to go with Atom; it&#x27;s open-source, so I can at least aspire to fix the damn thing myself when I get annoyed enough.