3

First of all, from http://www.emacswiki.org/emacs/AllOut:

Allout outline mode is part of GnuEmacs.

Allout outline mode provides extensive outline formatting and manipulation beyond standard emacs outline mode. It provides for structured editing of outlines, as well as navigation and exposure. It also provides for syntax-sensitive text like programming languages. (For an example, see the allout code itself, which is organized in an allout outline framework.)

If you view the “allout.el” itself, and trigger M-x allout-hide-bodies, you’ll get an indented outline view of the source code.

How can I configure allout-mode to understand markdown syntax so that I can use it to navigate and show/hide sections in a markdown file?

Thanks

  • Unclear what you are asking. For one thing, markdown is mentioned in the title but nowhere in the question. For another, what do you mean by "can somehow get configured"? – Drew Jan 10 '15 at 21:17
  • 1
    It sounds like the question is: how does one configure allout mode to treat markdown headers as outline elements. @xpt, is that correct? I've personally never used allout, though. – glucas Jan 10 '15 at 21:28
  • Yep, @glucas, exactly. The allout mode is really nice, if you follow the above wiki, view the “allout.el” itself, and trigger M-x allout-hide-bodies, you’ll love it right there. – xpt Jan 10 '15 at 21:36
  • OK, I edited the bit at the end to hopefully clarify the question. Feel free to further correct it. – glucas Jan 10 '15 at 21:41
5

If I understand the question, you are looking for a way to edit markdown files where you can show or hide sections, navigate by headings and so on.

I've never used allout-mode but it does look like you could configure it to recognize markdown syntax. However, another option is to take a look at markdown-mode which supports navigation and folding, e.g.

markdown-mode supports outline-minor-mode as well as org-mode-style visibility cycling for atx- or hash-style headings. There are two types of visibility cycling: Pressing S-TAB cycles globally between the table of contents view (headings only), outline view (top-level headings only), and the full document view. Pressing TAB while the point is at a heading will cycle through levels of visibility for the subtree: completely folded, visible children, and fully visible.

  • Oh, that works great. Thanks. I've edited the title to reflect the correct answer. Feel free to tweak it further. – xpt Jan 10 '15 at 21:48

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.