ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Martin 'golodhrim' Scholz <scholz.m82@googlemail.com>
To: ntg-context@ntg.nl
Subject: Re: vim syntax highlighting in MKIV
Date: Sun, 27 Jun 2010 10:04:34 +0000 (UTC)	[thread overview]
Message-ID: <i077ng$v3t$1@dough.gmane.org> (raw)
In-Reply-To: <alpine.LNX.2.01.1006270053510.22287@ybpnyubfg.ybpnyqbznva>

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
___________________________________________________________________________________


  reply	other threads:[~2010-06-27 10:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 19:48 Martin 'golodhrim' Scholz
2010-06-25 21:24 ` Hans Hagen
2010-06-27  2:38   ` Aditya Mahajan
2010-06-27  5:41     ` Aditya Mahajan
2010-06-27 10:04       ` Martin 'golodhrim' Scholz [this message]
2010-06-27 11:36       ` Peter Münster
2010-06-27 15:49         ` Aditya Mahajan
2010-06-27 18:16           ` Martin 'golodhrim' Scholz
2010-09-04 16:10           ` Chen Shen
2010-09-04 17:15             ` Wolfgang Schuster
2010-09-06 21:56               ` Aditya Mahajan
2010-06-27 12:02       ` Wolfgang Schuster
2010-06-27 15:47         ` Aditya Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='i077ng$v3t$1@dough.gmane.org' \
    --to=scholz.m82@googlemail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).