Loading ...
Sorry, an error occurred while loading the content.

Re: "./vimXX/src/syntax.c" as an external utility?

Expand Messages
  • Guido van Steen
    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
    Message 1 of 5 , Oct 11, 2009
    • 0 Attachment
      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.ml@...> wrote:

      > From: Yakov Lerner <iler.ml@...>
      > Subject: Re: "./vimXX/src/syntax.c" as an external utility?
      > To: vim_dev@...
      > Date: Sunday, 11 October, 2009, 5:17 PM
      >
      > On Sun, Oct 11, 2009 at 00:46, Guido van Steen <gvsteen@...>
      > 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
      -~----------~----~----~----~------~----~------~--~---
    • Guido van Steen
      Hi Nikolai, Thanks for your advice. I am not sure though if writing a zsh script will be much simpler for me. My problem is that I am unfamiliar with VIM s
      Message 2 of 5 , Oct 11, 2009
      • 0 Attachment
        Hi Nikolai,

        Thanks for your advice. I am not sure though if writing a zsh
        script will be much simpler for me. My problem is that I am
        unfamiliar with VIM's syntax files.

        For this reason I thought that I might be able to use
        VIM which provides syntax/lexical coloring/highlighting
        already.

        Best wishes,

        Guido

        --- On Sun, 11/10/09, Nikolai Weibull <now@...> wrote:

        > From: Nikolai Weibull <now@...>
        > Subject: Re: "./vimXX/src/syntax.c" as an external utility?
        > To: vim_dev@...
        [snip]
        > It would be a lot simpler to just write some Zsh code for
        > this.



        New Email names for you!
        Get the Email name you've always wanted on the new @ymail and @rocketmail.
        Hurry before someone else does!
        http://mail.promotions.yahoo.com/newdomains/aa/
        a/

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.