marshallward / vim-restructuredtext

Syntax file for reStructuredText on Vim.
26 stars 12 forks source link

Directives for code blocks #5

Open marshallward opened 8 years ago

marshallward commented 8 years ago

Code blocks do not currently highlight directives, and instead highlight them as part of the code block, e.g.:

.. code:: c
   :number-lines: 10

   int main() {}

This is primarily an issue when using a language-specific syntax highlight inside of a code block.

anntzer commented 8 years ago

FWIW this is not specific to code blocks, other directives can contain options such as

.. image:: picture.jpeg
   :height: 100px
   :width: 200 px
   :scale: 50 %
   :alt: alternate text
   :align: right

(http://docutils.sourceforge.net/docs/ref/rst/directives.html#image)

It would be nice if these options were highlighted separately.