Plasticboy Markdown

Posted : admin On 15.08.2021

The `:InsertToc` command inserts a table of contents at the current line in the markdown buffer. The `:InsertNToc` command behaves like `:InsertToc,` but the format of h2 headers in the table of contents is a numbered list, rather than a bulleted list. Markdown-drawer is pretty cool if you have to navigate large files. Still early stages but works reasonably well. Still early stages but works reasonably well. I haven't decided if I'll keep it because folding gets me 90% of the way without this. Markdown Vim Mode. Contribute to plasticboy/vim-markdown development by creating an account on GitHub. Markdown is a lightweight markup language with plain text formatting syntax. Its design allows it to be converted to many output formats, but the original tool by the same name only supports HTML. Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text.

02 Jan 2016

While writing a post yesterday I noticed there were some gaps in my vim setup for when I'mauthoring a markdown file so here are a few tips for polishing up your markdown experience in vim,specifically for jekyll blogs.

Front Matter

Starting at the top, literally, with the front matter. It was looking a bit weird out of the box:

Plasticboy/vim-markdown 使い方

It's rather inconsequential data compared to the meat of the document, the actual content. I found ahelpful blog post with some details that worked for me. The heart of which is to parse between the---s and consider this content a comment.

After, it looks a little less odd. By book or by crook pdf free download windows 10.

Plasticboy/vim-markdown 設定


I prefer a little more space when I'm writing so I change the width before text wraps to somethingslightly more than my default 80 character width - like 100 characters. In my autocommand group Iplace something like:

Fenced-in Languages

If you have many, or maybe super-specific, languages and syntaxes you commonly use in your markdownyou can specify them in your vimrc to be interpreted as such.


I use snipmate but I guess the same can be applied with something like UltiSnips? Probably. In anycase, snippets are a lifesaver for the occasional piece of code or markup you can either neverremember the exact syntax for, or are slightly awkward to type. For me it's more often the former.


Plasticboy/vim-markdown 设定

The first two are for links and image tags, respectively. I consistently confuse the two so whyleave it to guessing? The front snippet is handy in that date for the permalink is automaticallypopulated when the snippet is expanded.

Preview Your Markdown

A tweet from Ches asking about previewing documents piqued my curiosity so I decided to look into ita little further. His suggestion to try the QuickLook plugin was met with failure, as he mentioned,as there's some weirdness when you try to launch from terminal. From finder it seems to work justfine but that defeats the purpose of being vim-driven, right? The next best thing would be toleverage a native mac app to get a look at what our rendered markdown files look like. The app Iprefer is called MacDown and has plenty of good features if you ever feel like dropping into a guiapp instead of vim.

MacDown comes with a cli command you can use to open documents from the terminal but I've found thatit doesn't retain your preferences and switches to the defaults once you use it. Using OS X's opencommand, however, does retain your preferences. So, about getting vim to play nice with this? Not sohard:

Plasticboy/vim-markdown 設定

So <leader>pre will now open up MacDown with the current document so I can get a good look. Notbad!

The changes to MacDown's preferences I've found useful:

  • General > Put editor on the right. I don't care much about the editor, so it gets shoved right.
  • Rendering > Detect Jekyll front-matter. For those of us jekyll users.

Helpful Plugins

Plasticboy Markdown

  • goyo.vim plugin. A really nice distraction free writing plugin suggested by Thomas.
  • tpope's markdown plugin. Arguably unecessary but provides some fenced codeblock extras.
  • Chris Toomey's titlecase plugin. Teach Vim about titlecase, with support for motions and text objects
  • Chris Toomey's quicklink plugin. This is nothing short of beautiful. A Vim plugin for quicklylooking up a topic in google and inserting the relevant link. Bonus video with some insight on thesetwo plugins from Chris.