From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59873 Path: news.gmane.org!not-for-mail From: Martin 'golodhrim' Scholz Newsgroups: gmane.comp.tex.context Subject: Re: vim syntax highlighting in MKIV Date: Sun, 27 Jun 2010 10:04:34 +0000 (UTC) Message-ID: References: <4C251E90.3050808@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1277633101 17059 80.91.229.12 (27 Jun 2010 10:05:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 Jun 2010 10:05:01 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Jun 27 12:05:00 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 1OSojR-0005Xf-7t for gctc-ntg-context-518@m.gmane.org; Sun, 27 Jun 2010 12:04:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C3C8AC9B07; Sun, 27 Jun 2010 12:04:56 +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 UabbrWKhRf+5; Sun, 27 Jun 2010 12:04:54 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 333F1C9A9C; Sun, 27 Jun 2010 12:04:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 25331C9A9C for ; Sun, 27 Jun 2010 12:04:53 +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 Ru+-+yy8VQDA for ; Sun, 27 Jun 2010 12:04:50 +0200 (CEST) Original-Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by balder.ntg.nl (Postfix) with ESMTP id DAC78C9A8A for ; Sun, 27 Jun 2010 12:04:50 +0200 (CEST) Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OSojG-0005Tg-Gr for ntg-context@ntg.nl; Sun, 27 Jun 2010 12:04:46 +0200 Original-Received: from 109.120.68.218 ([109.120.68.218]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Jun 2010 12:04:46 +0200 Original-Received: from scholz.m82 by 109.120.68.218 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Jun 2010 12:04:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 79 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 109.120.68.218 User-Agent: Pan/0.133 (House of Butterflies) 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:59873 Archived-At: On Sun, 27 Jun 2010 01:41:35 -0400, Aditya Mahajan wrote: > On Sat, 26 Jun 2010, Aditya Mahajan wrote: > >> Almost all the errors in t-vim over the years have due to trying to >> support kpse: directive. (The errors were not a fault of ConTeXt, but >> the way quotes are handled by cmd.exe and the various shells in *nix. I >> still haven't figured out a syntax that works with all shells). This >> makes me wonder whether it was a good idea to make vim module work out >> of the box. Perhaps a more robust alternative was to ask the uses to >> copy 2context.vim to $HOME/.vim/scripts/ and forget about getting >> mtxrun to locate the file. What do others think? > > 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 place > them in the current directory. > > This new version is delegates the task of creating external files and > running vim to get syntax highlighting to t-filter. It reads the file > under a restrictive catcode regime... so 2context.vim only has to escape > a few characters: \ { }, everything else has a catcode other (except > space and newline which are active). > > Currently, this new module only supports > > * syntax highlighting (syntax=filetype) > > * two color schemes (alternative=pscolor and alternative=blackandwhite) > > * specifying start and stop lines (start=... , stop=...) > > An additional feature is that the module stores the md5 sums of all > files, and runs vim only if the file has changed. So, this should be > significantly faster than the old module. > > Difference > > * No \typevimfile... instead \definevimtyping[whatever] creates a > command \typewhateverfile that can be used as > \typewhateverfile[options][file] > > * Currently, no support for line numbering, although that should be easy > to add now. > > * No support for active spaces yet. > > * Most importantly, this only runs under MkIV. That is because > \doprocesslocalsetups is not defined in MkII. > > Hans, can you add the definition of \doprocesslocalsetups to MkII? > > I have only tested on linux. Testing on other platforms will be > appreciated (Just run the files under test/vim/). > > Aditya Hi Aditya, just cloned the your git and linked them into the project I use the syntax highlightling, and it works, thanks for the fast and professional help... Greetings -- --- Martin 'golodhrim' Scholz Auf dem Sattler 4 34516 Ederbringhausen Phone: +49 6454 799623 mobile: +49 176 63301749 Fax: +49 6454 e-Mail: scholz.m82@googlemail.com Avec! ___________________________________________________________________________________ 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 ___________________________________________________________________________________