Collapsing based on indentation (JavaScript)


#1

I’ve been using Atom for a few months now after transitioning over from Sublime. One thing that I got in the habit of doing when I was in sublime was using comments to help organize my code. For example:

//Variables
    var foo = 'bar';

//Functions
   /**
     * Bar
     * @returns [string]
     */ 
    function bar() {
        return 'foo';
    }

In sublime, I could collapse //Variables and //Functions depending on what I am doing. Sublime seems to do its collapsing based on indentation. I’m not sure what Atom does, but when I try to collapse functions, for example, I get:

//Variables
    var foo = 'bar';

//Functions...
    function bar() {
        return 'foo';
    }

I would expect to get:

//Variables
    var foo = 'bar';

//Functions...

I really miss being able to use comments to help organize and truncate my files.