zed icon indicating copy to clipboard operation
zed copied to clipboard

Markdown outline and folding support

Open StephenSmithwick opened this issue 2 years ago • 5 comments

Check for existing issues

  • [X] Completed

Describe the feature

Currently the html editor breaks editor content into a hierarchy which can be folded (hidden) by clicking on the carrot() in the margin.

Can we have a similar capability added to markdown.

The suggested behaviour would be similar to vscode's current solution:

⌄ # Header 1
  Some content
⌄ ## Sub Header
  Some more content
⌄ ## Header 2
  The final content
  1. Clicking on carrot beside Header 1 would hide all content below Header 1 up to Header 2
  2. Clicking on carrot beside Sub Header would hide content below Sub Header up to Header 2
  3. Editing the header line can be edited in place without expanding.
  4. Editing the line below the hidden content would re-expand the hidden content

If applicable, add mockups / screenshots to help present your vision of the feature

No response

StephenSmithwick avatar Mar 16 '23 09:03 StephenSmithwick

More Markdown folding ideas:

  • fenced code blocks ```
  • entire lists (currently only nested lists can be folded under their parent)
  • tables
  • definition lists

notpeter avatar Jul 31 '24 16:07 notpeter

Would love to see this, especially since I've started using Zed AI for documentation generation.

aeryncaen avatar Oct 30 '24 09:10 aeryncaen

I have lots of large markdown files, the outline and folding supporting is great to see。

opsnull avatar Nov 05 '24 02:11 opsnull

For navigating lengthy Markdown documents, nested heading breadcrumbs that support multi-level headings are essential, enabling users to jump directly to any heading (as mentioned in https://github.com/zed-industries/zed/issues/21320).

KevinSource0 avatar Jan 03 '25 03:01 KevinSource0

any planning for this?

opsnull avatar May 25 '25 13:05 opsnull

See #22703 for likely implementation mechanism.

(I cannot emphasize enough how much I crave this feature! Many of my documents are just unwieldy to scroll back and forth in.)

tv42 avatar Jun 18 '25 22:06 tv42

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 07:11 github-actions[bot]

Not stale, latest tag 0.212 still doesn't have header folding.

detjensrobert avatar Nov 19 '25 07:11 detjensrobert

Sorry for the noise, the stalebot upstream went haywire.

Please disregard it.

miguelraz avatar Nov 19 '25 12:11 miguelraz