12

I use markdown-mode (in conjunction with writeroom-mode) for writing in Emacs. My markdown files generally gets quite large, and I would like to be able to focus on a particular section for extended periods of time.

How can I achieve this? Specifically I'm looking to hide or collapse other sections (heading and their text) while working on the current one. http://www.foldingtext.com behaves in this manner.

11

With markdown-mode by Jason Blevins you can toggle folding of the heading with Tab (same as in org-mode).

  • 4
    True (+1). However, with emacs -nw, it turns out that you want to use Shift + Tab to get things to fold. (Which I only mention because I only found out by accident that this works....) – jon Jan 11 '16 at 16:40
2

I've found two ways that can be useful:

  1. enable hideshow mode (hs-minor-mode) and use the provided functions
  2. Apparently markdown-mode inherits from outline mode (or at least the functions are available here!) so you can use functions like hide-subtree and show-subtree.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.