Hi Yakov, 

Thanks a lot! I did not know that VIM could be run in batch 
mode. That is a good feature to know about anyway! 

I just tried it out but unfortunately (on my laptop) it takes 
about 150 miliseconds to process a simple command. So I am 
afraid this will not be usable for on-the-fly syntax/lexical 
highlighting/coloring coloring. 

I think I will have to write something quicker. 

Guido 

--- On Sun, 11/10/09, Yakov Lerner <iler...@gmail.com> wrote:

> From: Yakov Lerner <iler...@gmail.com>
> Subject: Re: "./vimXX/src/syntax.c" as an external utility?
> To: vim_dev@googlegroups.com
> Date: Sunday, 11 October, 2009, 5:17 PM
> 
> On Sun, Oct 11, 2009 at 00:46, Guido van Steen <gvst...@yahoo.com>
> wrote:
> >
> > Dear VIM developers,
> >
> > I would like to use VIM's syntax/lexical
> highlighting/coloring in order to color the command line in
> zsh - and if possible highlight it as well. (For zsh: see
> "www.zsh.org"). I would actually hope that this can be done
> using VIM's zsh' syntax file ("./vimXX/syntax/zsh.vim")
> >
> > It seems to me that within VIM the actual VIM
> syntax/lexical highlighting/coloring has been programmed in
> the file "./vimXX/src/syntax.c".
> >
> > Unfortunately, however, I am not any good at C
> programming. Therefore most of this "syntax.c" file seems
> like magic to me.
> >
> > My question is: Could someone give me some idea on how
> this "syntax.c" file could be turned into into an external
> program, which takes a "zsh file" as its input, and which
> provides the information on the syntax/lexical
> highlighting/coloring of this "zsh file" as its output??
> >
> > Does someone know if such an external program has ever
> been made?
> 
> Yes. Probably you'll want to use vim in batch mode, along
> the lines of
> 
>    vim -c 'set ft=zsh|syntax on' -c 'TOhtml'
> -c 'w!
> /path/to/output.html' -c 'qall!' input_file
> 
> This line seems to actually work :-)  Ask on "vim_use"
> forum for
> further details (*1).
> And see :help convert-to-HTML
> 
> If you wrap this line into shell script, you get the
> "external utility".
> 
> Yakov
> 
> (1) http://groups.google.com/group/vim_use
> 
> > 
> 


      Get your new Email address!
Grab the Email name you've always wanted before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui