From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/61462 Path: news.gmane.org!not-for-mail From: Chen Shen Newsgroups: gmane.comp.tex.context Subject: Re: vim syntax highlighting in MKIV Date: Sun, 5 Sep 2010 00:10:16 +0800 Message-ID: References: <4C251E90.3050808@wxs.nl> <20100627113643.GA3650@gaston.couberia.bzh> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1747665964==" X-Trace: dough.gmane.org 1283616640 13318 80.91.229.12 (4 Sep 2010 16:10:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Sep 2010 16:10:40 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 04 18:10:37 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OrvK9-0005tH-NU for gctc-ntg-context-518@m.gmane.org; Sat, 04 Sep 2010 18:10:37 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D289BCA60E; Sat, 4 Sep 2010 18:10:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vrOPfwKXNQZn; Sat, 4 Sep 2010 18:10:32 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2BCCCCA5FB; Sat, 4 Sep 2010 18:10:32 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BAD26CA5FB for ; Sat, 4 Sep 2010 18:10:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id VSZWpZOKrM9Z for ; Sat, 4 Sep 2010 18:10:17 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id B5090C9BDF for ; Sat, 4 Sep 2010 18:10:17 +0200 (CEST) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o84GAGfX003649 for ; Sat, 4 Sep 2010 18:10:17 +0200 Original-Received: by bwz6 with SMTP id 6so3080392bwz.14 for ; Sat, 04 Sep 2010 09:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=Y0qfGn4fLuqB6sc6EuIVtD2lBu7V+V81anCQTU7J+a0=; b=q0mDZFuHQqRuTgUohc2YD5a02XVuclQvXObhwCbqBuO8NZ3GCDtqX/bQbWgmPFvEkS 4SdlRcOYNgfq0fUBQpi4yb+RwwLgsfENu8Pe+NHvBhT/ixQE80VKYYlTmC9VFq1D0hDD pWYI0omHpSRHuAzFufjk5eM5xP1k8pIRFck0w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=beTOw1Af5FNxT1nkTMk5jyMefspM8fgH3c8ZqYTsaMWKAoJeFjZh+gKA3w8ySHOmtf Vmiw89EL0WgEd4LHKhRLMDG5/s/m3zLqSXXV9IKrBc3Eq2fZewHsxiNmtY6hvOoClo4q 69vjOWfApFyU0/lxIlBWXx1Z+slyx5Wqc7W5s= Original-Received: by 10.204.19.145 with SMTP id a17mr1503972bkb.148.1283616616386; Sat, 04 Sep 2010 09:10:16 -0700 (PDT) Original-Received: by 10.204.55.143 with HTTP; Sat, 4 Sep 2010 09:10:16 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xD2Eaggn - 56c35fa3dd39 - 20100904 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:61462 Archived-At: --===============1747665964== Content-Type: multipart/alternative; boundary=00032555bb5a729191048f7148e4 --00032555bb5a729191048f7148e4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Aditya, Thanks for the great module! There is a problem using t-vim/t-filter with the current and beta versions of ConTeXt. I was trying the Matlab example (tests/vim/matlab.tex), ConTeXt complains that \startMATLAB is not defined, but the execution can continue, and the correct pdf is produced. regards, shenchen Below is the log message: -------------------------------------------------- system : module vim loaded (t-vim.tex system : module filter loaded (t-filter.tex) color : system hex is loaded (/opt/home/hash/context/tex/texmf-context/tex/context/base/colo-hex.tex (/opt/home/hash/context/tex/texmf-context/tex/context/base/colo-hex.mkiv))) publications : loading formatting style from bxml-apa (/opt/home/hash/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv) systems : begin file test.tex at line 6 ! Undefined control sequence. system > error on line 7 in file test.tex: Undefined control sequence ... 1 \setupcolors[state=3Dstart] 2 \usemodule [vim] 3 4 \definevimtyping [MATLAB] [syntax=3Dmatlab] 5 6 \starttext 7 >> \startMATLAB 8 function russell_demo() 9 % Do the example in ch 17 (p501) of Russell and Norvig 10 % (1,1) is top left corner. 11 r =3D 3; c =3D 4; p =3D 0.8; action_cost =3D -1/25; 12 obstacle =3D zeros(r,c); obstacle(2,2)=3D1; 13 terminal =3D zeros(r,c); terminal(1,4)=3D1; terminal(2,4)=3D1; 14 absorb =3D 1; 15 wrap_around =3D 0; 16 noop =3D 0; 17 T =3D mk_grid_world(r, c, p, obstacle, terminal, absorb, wrap_around= , noop); \v!unknwon \p!compareprocessaction ...]->\edef \!!stringb {#1 }\ifx \!!stringb \s!defaul... \next1 #1,->\p!doprocessaction {#1} \doprocesscommaitem \processnextcommalist ...odoprocesscommaitem #4#5, ]\relax \global \advance \... \dostartexternalfilter ...ter!!method \zerocount ] \doifelse {\externalfilter... l.7 \startMATLAB ? (test-externalfilter-MATLAB-0.vimout Overfull \hbox (30.53203pt too wide) in paragraph at lines 10--10 [][][]\*modern12pttttf* T =3D mk_grid_world(r, c, p, ob-sta-cle, ter-mi-nal= , ab-sorb, wrap_around, noop); ---------- On Sun, Jun 27, 2010 at 11:49 PM, Aditya Mahajan wrote: > On Sun, 27 Jun 2010, Peter M=C3=BCnster wrote: > > On Sun, Jun 27 2010, Aditya Mahajan wrote: >> >> In the spirit of MkIV, I have attempted to redo the vim module from >>> scratch. >>> >>> http://github.com/adityam/filter >>> >>> Download t-vim.tex t-filter.tex and 2context.vim. For testing just plac= e >>> them in the current directory. >>> >> >> Hello Aditya, >> >> Thanks for these great modules! It would be nice to make them available >> in >> the minimals! >> > > I will add them to the garden, once I the features stabalize a bit. > > Aditya > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > > --00032555bb5a729191048f7148e4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Aditya,

Thanks for the great module!

There is a problem using t-vim/t-filter with the current and beta = versions of ConTeXt.
I was trying the Matlab example (tests/vim/m= atlab.tex), ConTeXt complains that \startMATLAB is not defined,=C2=A0
but the execution can continue, and the correct pdf is produced.
=

regards,
shenchen

Be= low is the log message:

--------------------------= ------------------------
system =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: m= odule vim loaded
(t-vim.tex
system =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0: module filter loaded
(t-filter.tex)
color =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : system hex is loaded
<= div>(/opt/home/hash/context/tex/texmf-context/tex/context/base/colo-hex.tex= (/opt/home/hash/context/tex/texmf-context/tex/context/base/colo-hex.mkiv))= )
publications =C2=A0 =C2=A0: loading formatting style from bxml-= apa
(/opt/home/hash/context/tex/texmf-context/tex/context/base/bxml-apa.mk= iv)
systems =C2=A0 =C2=A0 =C2=A0 =C2=A0 : begin file test.tex at = line 6
! Undefined control sequence.

sys= tem =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> error on line 7 in file test.tex= : Undefined control sequence ...

=C2=A01 =C2=A0 =C2=A0 \setupcolors[state=3Dstart]
=
=C2=A02 =C2=A0 =C2=A0 \usemodule [vim]
=C2=A03 =C2=A0 =C2=A0= =C2=A0
=C2=A04 =C2=A0 =C2=A0 \definevimtyping =C2=A0[MATLAB] =C2= =A0[syntax=3Dmatlab]
=C2=A05 =C2=A0 =C2=A0=C2=A0
=C2=A0= 6 =C2=A0 =C2=A0 \starttext
=C2=A07 >> =C2=A0\startMATLAB
=C2=A08 =C2=A0 =C2=A0 functio= n russell_demo()
=C2=A09 =C2=A0 =C2=A0 % Do the example in ch 17 = (p501) of Russell and Norvig
10 =C2=A0 =C2=A0 % (1,1) is top left= corner.
11 =C2=A0 =C2=A0 r =3D 3; c =3D 4; p =3D 0.8; action_cos= t =3D -1/25;
12 =C2=A0 =C2=A0 obstacle =3D zeros(r,c); obstacle(2,2)=3D1;
13 =C2=A0 =C2=A0 terminal =3D zeros(r,c); terminal(1,4)=3D1; terminal(2,4)= =3D1;
14 =C2=A0 =C2=A0 absorb =3D 1;
15 =C2=A0 =C2=A0 w= rap_around =3D 0;
16 =C2=A0 =C2=A0 noop =3D 0;
17 =C2=A0 =C2=A0 T =3D mk_grid_world(r, c, p, obstacle, terminal, abso= rb, wrap_around, noop);

<argument> \v!unknwo= n=C2=A0
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0
\p!compareprocessaction ...]->\ede= f \!!stringb {#1
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}\ifx \!!stringb \s!defaul...
\next1 #1,->\p!doprocessaction {#1}
=C2=A0=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 \doprocesscommaitem=C2=A0
\processnex= tcommalist ...odoprocesscommaitem #4#5,
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0]\relax \global \advance \...
\dostartexternalfilter ...ter!!method \zerocount ]
=C2=A0=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0\doifelse {\externalfilter...
<to be read again>=C2=A0
=C2=A0=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
l.7 \startMATLAB<= /div>
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
?=C2=A0

(test-externalfilter-MATLAB-0.vimou= t
Overfull \hbox (30.53203pt too wide) in paragraph at lines 10--= 10
[][][]\*modern12pttttf* T =3D mk_grid_world(r, c, p, ob-sta-cle, ter-m= i-nal, ab-sorb, wrap_around, noop);=C2=A0
----------


On Sun, Jun 27, 2010 = at 11:49 PM, Aditya Mahajan <adityam@umich.edu> wrote:
On Sun, 27 Jun 2010, Pete= r M=C3=BCnster wrote:

On Sun, Jun 27 2010, Aditya Mahajan wrote:

In the spirit of MkIV, I have attempted to redo the vim module from
scratch.

http://githu= b.com/adityam/filter

Download t-vim.tex t-filter.tex and 2context.vim. For testing just place them in the current directory.

Hello Aditya,

Thanks for these great modules! =C2=A0It would be nice to make them availab= le in
the minimals!

I will add them to the garden, once I the features stabalize a bit.

Aditya
__________________________________________________________= _________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank"= >http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =C2=A0: http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive =C2=A0: http://foundry.supelec.fr/projects/contextrev/
wiki =C2=A0 =C2=A0 : http://contextgarden.net
___________________________________________________________________________= ________


--00032555bb5a729191048f7148e4-- --===============1747665964== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1747665964==--