On Sun, Oct 11, 2009 at 00:46, Guido van Steen <[email protected]> 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 --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
