It did not work, either. Same problem.
On Fri, Apr 10, 2009 at 3:13 PM, Aditya Mahajan
<adityam@umich.edu> wrote:
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%