4 ms·
I outline my code, and other documents, by using folding in Vim. Plus plugins for Markdown, LaTeX, and other formats generate tables of contents from headers an
by leephillips 5y ago
I outline my code, and other documents, by using folding in Vim. Plus plugins for Markdown, LaTeX, and other formats generate tables of contents from headers and sections.
- dotancohen 5y agoPlease suggest a good Markdown plugin for VIM - and why you like it. I've given up on the plugins... I'm now editing Markdown in plain VIM and my newest files are org-mode instead.
- leephillips 5y agoI use vim-markdown. It's not perfect, but does what I want. Generates a table of contents in a side window, from there I can jump to any heading by putting the cursor on the item and pressing RETURN. The TOC is indented to show heading level, so it serves as an outline. In the main window there are commands to jump to next or previous heading, sibling, heading of current section. It has concealing for bold, italic, and (this one is important) links. It syntax colors code blocks using the syntax file for the language in the block. I'm making small changes to it, and actually have my own fork on GitHub with a change that I needed. But the developer doesn't seem to tend to it much.
- dotancohen 5y agoThanks, I found your fork here: https://github.com/leephillips/vim-markdown https://github.com/leephillips/vim-markdown I'll take a look at it. Tim Pope also has an independent plugin also called vim-markdown, I don't remember what the differences were between your upstream and his.
- leephillips 5y agoLooks like (vim legend) Tim Pope’s is the Markdown support included with Vim. My fork is of plasticboy’s, which adds a few features, like the TOC generation, to the default. So far my fork just adds one option that I needed, to only recognize Atx headers.
- I_complete_me 5y agoNot OP, I am using these two https://github.com/masukomi/vim-markdown-folding.git https://github.com/masukomi/vim-markdown-folding.git & https://github.com/plasticboy/vim-markdown.git https://github.com/plasticboy/vim-markdown.git and they work great. I like them because they work fine for me.
- dotancohen 5y agoThank you! Why are you using a separate folding plugin, doesn't vim-markdown provide folding? Does it fold better?
- I_complete_me 5y agoI've been using them so long I can't be 100% sure but while they both fold, only one of them preserves the title of the heading while the other folds the whole section. Check the documentation.