https://github.com/wikimatze/tocdown
Display the headlines of a markdown document in an extra window.
https://github.com/wikimatze/tocdown
Last synced: about 2 months ago
JSON representation
Display the headlines of a markdown document in an extra window.
- Host: GitHub
- URL: https://github.com/wikimatze/tocdown
- Owner: wikimatze
- Created: 2011-12-18T10:21:39.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-26T09:03:22.000Z (over 12 years ago)
- Last Synced: 2025-03-25T14:44:52.914Z (2 months ago)
- Language: Ruby
- Homepage: http://wikimatze.de
- Size: 124 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tocdown.vim is a Vim plugin to to display the headlines of a markdown document in an extra window.
## Description
When you are writing a tons of documents in markdown with many headings and you want to get an overview about all the
headlines you have, would it be very handy to have shortcut in Vim to simply give you a structured representation of all
the heading you have in your large markdown file?The great taglist.vim plugin solved the problem already for variables and functions of many
different programming languages but not for plain markdown-files. That's why I wrote this plugin.## Screencast
http://www.screenr.com/zvos
## Installation
Unzip the most recent ZIP (https://github.com/matthias-guenther/tocdown/zipball/master) archive file inside your Vim
profile directory (usually `~/.vim`). The plugin is compatible with Tim Popes pathogen script.## Usage
Simply press `:TocdownToggle` and the extra window with the headline of the current file will open. If you call
`:TocdownToggle` again, the window will be closed.When you know how you want to use this plugin, you can use a custom mapping in your |:vimrc| to toggle the toc of a
md-filennoremap :TocdownToggle
You can change the mapping to your needs.
## Idea and internals
This plugin takes a markdown-file and scans for heading. According to the heading level, the output
will be generated nicely intended and structured.For example the input file is:
# I'm the header #
...## I'm a subsection ##
...### I'm small as a pie ###
...# I'm simple and a second header
...## I'm simple and a subsection
...### I'm simple and small as a pie
The output will be written to a text-file with the following content:
I'm the header
I'm a subsection
I'm small as a pie
I'm simple and a second header
I'm simple and a subsection
I'm simple and small as a pieThis content of the text-file appears in the extra-window.
## Contribute/Contact
Feature request, bugs, questions, etc. can be send to . You can even
fork this project.## Self-Promotion
Like tocdown.vim? Then follow the repository on [GitHub][github] and vote for it on [vim.org][vim.org]. And if you're
feeling especially charitable, follow [wikimatze][wikimatze] on [Twitter][wikimatze-twitter] and
[GitHub][wikimatze-github].## License
This software is licensed under the [MIT license][mit].
© 2011-2013 Matthias Günther
[wikimatze]: http://wikimatze.de
[wikimatze-twitter]: https://twitter.com/wikimatze
[wikimatze-github]: https://github.com/matthias-guenther
[github]: https://github.com/matthias-guenther/tocdown
[vim.org]: http://www.vim.org/scripts/script.php?script_id=3856
[mit]: http://en.wikipedia.org/wiki/MIT_License