Git Product home page Git Product logo

outline-toc.el's Introduction

outline-toc.el

An Emacs extension that will render a "table of contents" for outline-mode "compatible" buffers (i.e. those that respond to outline-hide-body).

This TOC will show the sections in the document, highlighting the one that you're editing in the master document. The whole idea is to give you context as you're editing a large document (e.g. a markdown file or something).

Quickstart

Open up a supported file and run outline-toc-mode. This should open up a new window with a table of contents for your file. As you move around in the source buffer, the TOC should highlight the section you're in.

Here's an example showing outline-toc-mode while editing the markdown source for a chapter in one of my books:

Screencast

Current status

outline-toc works, more or less. You can open up the TOC and it'll stay synchronized with your master doc. It could certainly use some polish, though.

Right now this is known to work with markdown-mode, org-mode, and outline-mode files. It may work with others. I'd like it to work with restructured text, but there seem to be some problems there.

Caveat emptor, and a call to arms

In my estimation, this is currently built on a bit of a hack. outline-toc relies on outline-hide-body to show the section headers of documents; it doesn't bring any extra magic to the mix. Maybe there are better approaches, and I'm certainly open to ideas, PRs, etc.

Similarly, the "sidebar" buffer is lifted wholesale from minimap. Many Emacs packages implement similar functionality, and it would be nice if there was a shared implementation of "sidebars". Maybe this is unrealistic for some reason, but if someone has a re-usable library for this functionality I'd be eager to try it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.