Re:Leo Editor
by leephillips on Sunday September 26, 2021 @11:15PM
(#28666716)
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.
[ Parent
| on HN ]
Re:Leo Editor
by dotancohen on Monday September 27, 2021 @06:37AM
(#28669103)
Please 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.
Re:Leo Editor
by leephillips on Monday September 27, 2021 @08:52AM
(#28670058)
I 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.
Re:Leo Editor
by dotancohen on Monday September 27, 2021 @09:48AM
(#28670580)
Thanks, I found your fork here:
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.
Re:Leo Editor
by leephillips on Monday September 27, 2021 @09:59AM
(#28670708)
Looks 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.
Re:Leo Editor
by I_complete_me on Monday September 27, 2021 @08:57AM
(#28670094)
Not OP, I am using these two https://github.com/masukomi/vim-markdown-folding.git & https://github.com/plasticboy/vim-markdown.git and they work great. I like them because they work fine for me.
Re:Leo Editor
by dotancohen on Monday September 27, 2021 @09:50AM
(#28670607)
Thank you! Why are you using a separate folding plugin, doesn't vim-markdown provide folding? Does it fold better?
Re:Leo Editor
by I_complete_me on Tuesday September 28, 2021 @04:49PM
(#28687320)
I'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.