Last active
December 13, 2015 19:59
-
-
Save rmartinho/4966779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Sets up multi-language syntax for Jekyll blog posts | |
fun! SetJekyllPostSyntax() | |
" Bring in YAML syntax for front matter | |
unlet b:current_syntax | |
syntax include @Yaml syntax/yaml.vim | |
syntax region yamlFrontmatter start=/\%^---$/ end=/^---$/ keepend contains=@Yaml | |
" Bring in C++11 syntax for code snippets | |
unlet b:current_syntax | |
syntax include @Cpp syntax/cpp11.vim | |
syntax region cppCodeSnippet matchgroup=Comment start=/^{% highlight cpp %}$/ end=/^{% endhighlight %}$/ keepend contains=@Cpp | |
" Re-enable Markdown syntax | |
let b:current_syntax='markdown' | |
" Limit text width | |
set textwidth=80 | |
endfun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment