Closed hmenke closed 4 years ago
This was also asked on the context mailing list, so I'll copy-paste my reply from there:
Short answer. No.
Long answer. t-vim relies on vim to syntax highlight the code. Since the code is not valid python, the default python syntax highlighting will not work. In principle, it is possible to write a vim syntax highlighting script for a derivative of python where math terms are allowed, but that requires a lot of work for each language. The whole point of t-vim module was that I am lazy and don't want to write the parser for each language :-)
https://adityam.github.io/context-blog/post/vim-btex-etex-escape/
Thank you for taking the time to implement this! Maybe you should mark this as fixed now.
I am embarrassed to say that I forgot that you had raised this issue. As I said in my previous message (and also repeat in my blog post), I always thought that the implementation will be ugly. So, all thanks to Cristoph who wrote a clean implementation of this feature.
Fixed by ada5d0b
It would be cool if one could escape to ConTeXt within
/BTEX ... /ETEX
like for regulartyping
. This is extremely useful for annotating code. Currently only automatic escaping in comments works.