This is inspired from pull request #30 and #32 by @hernot, which was a follow up to #29.
Request #30 and #32 scan for \startline, \stopline and \someline in the comments and pass them unchanged to context.
I think that instead of writing such code for specific macros, it is better to implement the general purpose escape mechanism of /BTEX ... /ETEX, which is the standard mechanism for most typing environments in ConTeXt.
This pull request implements a simpler version of /BTEX ... /ETEX mechanism. We first scan the file for /BTEX ... /ETEX, and store the content of in a dictionary. Then, we remove all the /BTEX .. /ETEX from the file (so that they do not effect syntax highlighting), run the 2context.vim script and reinsert the content of /BTEX .. /ETEXat the end of the original lines.
Note that we do not attempt to reinsert the contents of /BTEX .. /ETEX at the correct column. It should be possible to keep track of the column with a little more book-keeping.
This is inspired from pull request #30 and #32 by @hernot, which was a follow up to #29.
Request #30 and #32 scan for
\startline
,\stopline
and\someline
in the comments and pass them unchanged to context.I think that instead of writing such code for specific macros, it is better to implement the general purpose escape mechanism of
/BTEX ... /ETEX
, which is the standard mechanism for most typing environments in ConTeXt.This pull request implements a simpler version of /BTEX ... /ETEX mechanism. We first scan the file for /BTEX ... /ETEX, and store the content of in a dictionary. Then, we remove all the /BTEX .. /ETEX from the file (so that they do not effect syntax highlighting), run the
2context.vim
script and reinsert the content of/BTEX .. /ETEX
at the end of the original lines.Note that we do not attempt to reinsert the contents of
/BTEX .. /ETEX
at the correct column. It should be possible to keep track of the column with a little more book-keeping.