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
```
Written by Andrew Radev
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#