Search code examples
vimmarkdowngithub-flavored-markdown

vim markdown syntax highlighting is very buggy


I'm not sure which markdown plugin I'm using, but it's not doing a great job of parsing this README.md file.

Here's a visual of what's going on: enter image description here

Not sure why it's highlighting everything after an underscore, highlights generally mean italic words. It's not very pleasent working in this way. By the way, I've posted the exact code here to demonstrate that the italics are not actually taking place after the underscore.

payment_address
POST
  currency      string      ex: "BTC"
  amount        int         ex: 100000
 *timeout       int         ex: 600
 *callback      JSON object
    method      string      ex: "HTTP_POST", "BLOCKCHAIN_WRITE"

    params      JSON object
      HTTP_POST PARAMS:
      url       string      ex: "http://florincoin.info/mucua/callback/
      data      string      ex: see below

The payment_address api is by far the most

Note: stackoverflow.com doesn't turn #### payment_address into a H3, but it also doesn't make the _address part italic.

  • Is this a bug in vim or am I doing something wrong?
  • How can I find out which vim plugin I'm using to issue a bug report / pull request for a fix?

Solution

  • This is because in markdown underscores mean italics, and that's what Vim is showing. Vim just renders italics in a weird way.

    What you are expecting is a Github extension.

    You can install this plugin to enable Github Flavored Markdown highlighting.