Taco Hoekwater wrote:
This makes comments behave like PI instructions, but maybe you want the entire comment grey, including the leading '' ? That would be require a much larger patch though. ...
Taco, thank you for the patch. But I figured out that those pieces of code are not human-readable (human-modifiable) and it's stupid to ask for help for every single character that one would like to change. I played a bit, just removed 80% of the stuff from 2html.vim (another 15% still waiting to be removed, I just wanted to try to test the code) and changed three lines or so to produce ConTeXt-friendly output. (http://pub.mojca.org/tex/vim/syntax/, you have to move 2context.vim to syntax folder and say :runtime! syntax/2context.vim) To test it I opened a simple file: <html> <body> My testfile: <img src="something.abc"> </body> </html> which resulted in: \HiSyntax[Identifier]{<}\HiSyntax[Statement]{html}\HiSyntax[Identifier]{>} \HiSyntax[Identifier]{<}\HiSyntax[Statement]{body}\HiSyntax[Identifier]{>} \HiSyntax[]{ My testfile: }\HiSyntax[Identifier]{<}\HiSyntax[Statement]{img}\HiSyntax[Identifier]{ }\HiSyntax[Type]{src}\HiSyntax[Identifier]{=}\HiSyntax[String]{"something.abc"}\HiSyntax[Identifier]{>} \HiSyntax[Identifier]{}\HiSyntax[Statement]{body}\HiSyntax[Identifier]{>} \HiSyntax[Identifier]{}\HiSyntax[Statement]{html}\HiSyntax[Identifier]{>} (sorry, slighlty unreadable, but the file is on the above mentioned link as well) Now two questions: 1. How should the output syntax look like and which exceptions should be considered? It's pretty trivial to replace braces with \} or \rightbrace or whatever, tabs by spaces (if requested), ... but I don't know at which level it is better to do that (to replace characters within the script or to change charcodes as in verbatim ...) Input text can probably be just everything that comes to someone's mind. 2. (I don't need the answer yet since I have to play a bit with the script first, I'll ask later once more.) How can I call vim, execute a couple of commands there and somehow "return" the ConTeXt code back? % lots of settings ... \definetyping[HTML][option=HTML] \setuptyping[mode=vim] % or engine=vim or ? % option would be passed on to vim with ":set syntax=\c!option" \startHTML <html> <body> abc </body> </html> \stopHTML Thank you, Mojca