preservim / vim-pencil

Rethinking Vim as a tool for writing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jekyll Code Blocks

thecliguy opened this issue · comments

I'm currently writing posts for a blog developed using Jekyll.

Posts are written in markdown, however code blocks use Jekyll's Liquid syntax. Code blocks are opened with {% highlight language-name %} and closed with {% endhighlight %}, EG:

{% highlight ruby %}
def foo
  puts 'foo'
end
{% endhighlight %}

I understand that vim-pencil's HardPencil mode has the ability to suspend formatting in code blocks. How can I instruct HardPencil mode to treat text surrounded by {% highlight language-name %} and {% endhighlight %} as a code block?