ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: t-vim failed under windows
Date: Fri, 10 Apr 2009 16:13:48 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.0904101608460.18385@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <bf0ab5a50904090831s42b9e426n948e9be43681c9de@mail.gmail.com>

On Thu, 9 Apr 2009, Andy Wong wrote:

> Hello,
>
> I have tried the example using the vim mode to typeset some c codes. When I
> run the sample file, context stop with errors. the sample file and log file
> as
> list below. I use the windowsXP with the minimal context from ConTeXt garden
> and \write18 is enabled.  From the log file, it seems the vim command is not
> properly quoted as follows:

Another attempt. Does the following test file work for you?

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Start file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\unprotect
\def\shellescapedquote{\letterdoublequote}

\def\runvimsyntax#1
    {\executesystemcommand
       {mtxrun --verbose bin:vim
        -u NONE  % No need to read unnessary configurations
        -e       % run in ex mode
        -C       % Set compatibile
        -n       % No swap
        -c \shellescapedquote set tabstop=\@@vstab\shellescapedquote\space
        -c \shellescapedquote syntax on\shellescapedquote\space
        -c \shellescapedquote set syntax=\@@vssyntax\shellescapedquote\space
        -c \shellescapedquote let contextstartline=\@@vsstart\shellescapedquote\space
        -c \shellescapedquote let contextstopline=\@@vsstop\shellescapedquote  \space
        -c \shellescapedquote source kpse:2context.vim\shellescapedquote\space
        -c \shellescapedquote wqa\shellescapedquote\space
         \shellescapedquote#1\shellescapedquote}}
\protect

\setupcolors[state=start]
\usemodule[vim]
\definevimtyping [C] [syntax=c]
\starttext
\startC
#include <stdio.h>
#include <stdlib.h>
void main()
{
   printf("Hello World\n") ;
   return;
}
\stopC
\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% End file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2009-04-10 20:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 15:31 Andy Wong
2009-04-09 21:22 ` Aditya Mahajan
2009-04-10  0:06   ` Andy Wong
2009-04-10  2:54     ` Aditya Mahajan
2009-04-10 13:59       ` Andy
2009-04-10 14:22         ` Aditya Mahajan
2009-04-10 15:12           ` Andy Wong
2009-04-10 20:13 ` Aditya Mahajan [this message]
2009-04-10 20:23   ` Andy Wong
2009-04-10 20:28     ` Aditya Mahajan
2009-04-10 20:33       ` Andy Wong

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=alpine.LNX.2.00.0904101608460.18385@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).