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:
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_addressPOST 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.
Add the text, “syntax on” anywhere in the file to enable syntax highlighting permanently for vim editor. Save and close the file by typing ':x'. For disabling the feature, just re-open . vimrc file, change the text “syntax on” to “syntax off” and save the file.
Syntax highlighting enables Vim to show parts of the text in another font or color. Those parts can be specific keywords or text matching a pattern. Vim doesn't parse the whole file (to keep it fast), so the highlighting has its limitations.
To highlight code, write the name of the language the code is written in after the initial triple backticks. In the above example, the code is written in JavaScript, and hence javascript is added after triple backticks.
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.
This is not an exact solution to your syntax highlighting issue but rather a solid way to debug VIM issues. Please don't mark this as the solution to your question.
I would manually go through your ~/.vim/bundles/ folder and mv
each plugin out one by one until you find the culprit. Start with the plugins that are likely to be causing the problem and continue from there. I.e, vim-markdown is more likely to be causing these issues than wap-it
(my VIM plugin ;) ).
If you still haven't found the culprit after moving all your plugins out, I would then ensure that you're running the latest version of VIM. If THAT doesn't work, I personally would try reinstalling but I'm also not very well versed regarding VIM's internals.
Hope this helps,
The solution I found was to escape underscores in my markdown code. It doesn't make a difference to github whether or not the underscores are escaped, but I suppose for compatibility reasons it's good to escape them anyway (it also solves the problem of incorrectly highlighted text in vim).
Update: This solution doesn't work when underscores are escaped in code spans. Here's an example:
Markdown code:
`HELLO\_WORLD`
Output:
HELLO\_WORLD
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With