Last Updated: February 25, 2016
·
2.252K
· AndrewRadev

Fenced code block highlighting with vim-markdown

You can use the g:markdown_fenced_languages variable to tell Vim to do syntax highlighting for embedded languages. For example:

let g:markdown_fenced_languages = ['ruby', 'vim']

As a result, in this markdown, the code block will be highlighted as ruby:

Here is some ruby:

``` ruby
def foo
    "bar"
end
```