[dev-context] Script files for third party modules.

Aditya Mahajan adityam at umich.edu
Thu Jan 4 21:30:00 CET 2007


On Thu, 4 Jan 2007, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> On Wed, 3 Jan 2007, Hans Hagen wrote:
>> 
>>> > Basically need to esacpe the quote inside quote.
>>> >
>>> oh, so actually we should patch texexec to escape the tui stuff?
>> 
>> No, I think that texexec is working in an expeted manner. I did not clearly 
>> understand how it worked, and that is why the confusion.
>> 
>> The module is finally ready. It works well for small snippets (<1000 
>> lines). I have uploaded it to http://modules.contextgarden.net/t-vim I made 
>> a mistake while naming the module, so all the files are in t-vim.tar.gz 
>> directory instead of t-vim. Hopefully, this will not cause any trouble.
>> 
>> The documentation is at
>> http://dl.contextgarden.net/modules/t-vim.tar.gz/doc/context/t-vim/t-vim.pdf 
>> 
>> and a sample matlab and context pretty output at
>> 
>> http://dl.contextgarden.net/modules/t-vim.tar.gz/doc/context/t-vim/t-vim-demo.pdf 
>> 
>> The context output is very similar to what I see on the vim screen :)
> looks like there is a problem around line 35
>
> %D \starttyping
> %D \definevimtyping [RUBY] [syntax=ruby]
> %D \stoptyping
> %D after which you can get ruby highlighting by
> %D \starttyping
> %D \startRUBY
> %D ....
> %D \stopRUBY
> %D \stoptyping
>
>
> has funny colloring

Yes, vim does that. Any line starting with % is a comment. Of these, any 
line that starts with %D honors context command highlighting regions. When 
it sees a \starttyping syntax highlighting is switched off until the next 
\stoptyping. So, everything between a \starttyping and \stoptyping is in 
black (the default \maincolor). What I use is the the default vim 
colorscheme (by Nikolai Weibull). Mojca had made some improvements to the 
context highlighting, which had a few improvements (mp syntax highlighting 
inside \startMPcode \stopMPcode etc, C syntax highlighting inside \startC 
\stopC, and so on). I do not remember whether it took care of 
\starttyping.

Redoing, vim syntax highlighting for context and metapost has been on my 
todo list for a long time. Someday the vim syntax highlighting rules will 
make sense to me.

Aditya


More information about the dev-context mailing list