markdown-folder icon indicating copy to clipboard operation
markdown-folder copied to clipboard

Fold all current headings

Open brettz9 opened this issue 8 years ago • 5 comments

How about a command for "fold all current"? Would be nice to be able to get a quick bird's eye view with one key command wherever you are...

Thanks!

brettz9 avatar Mar 28 '16 19:03 brettz9

Hi, and thank you very much for your suggestion! Can you elaborate a bit what "fold all current" would mean? Maybe you can achieve what you want using cycle and cycleall?

melke avatar Apr 02 '16 10:04 melke

I tried those, but cycleall was too broad and cycle was too specific.

Given the following:

# H1

Text1

## H2A

Text2A

### H3B

text3B

### H3B (Cursor here)

text3B

### H3C

text3C

## H2B

Text2B

...I'd like to see the following result immediately upon calling the proposed "fold all current" command:

# H1

Text1

## H2A

Text2A

### H3B...

### H3B... (Cursor here)

### H3C...

## H2B

Text2B

...and with one more toggle expanding the H3's and keeping the cursor still on H3B...

brettz9 avatar Apr 02 '16 17:04 brettz9

(And without the command needing to be tied only to h3, as I'd like to be able to use the same command to do the same thing with h1, h2, etc., depending on the context.

brettz9 avatar Apr 02 '16 17:04 brettz9

Thanks for the explanation, I'll see if I can figure out a way to achieve this.

melke avatar Apr 03 '16 20:04 melke

Cool---btw, if since you are apparently another fan of headings, and if you weren't already aware, there are some helpful add-ons, HeadingsMap (Firefox or Chrome) or, if you prefer, for Chrome only, HTML5 Outliner which turn headings into a table of contents.

It'd be cool to have a sidebar within Atom for such contents, but at least these add-ons work once the README is available on Github or such.

brettz9 avatar Apr 03 '16 20:04 brettz9