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

HTML file with the Vim syntax highlighting

Expand Messages
  • Waters, Bill
    I see that I can use the 2html.vim script to convert a source file into a HTML file with the Vim syntax highlighting, using the following ... What is the best
    Message 1 of 16 , Dec 20, 2007
      I see that I can use the 2html.vim script to convert a source file into
      a HTML file with the Vim syntax highlighting, using the following
      command:

      :runtime! syntax/2html.vim

      What is the best way to do this with several files at once?

      Thanks,
      Bill

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... (untested) ... Best regards, Tony. -- Be braver -- you can t cross a chasm in two small jumps. --~--~---------~--~----~------------~-------~--~----~ You
      Message 2 of 16 , Dec 20, 2007
        Waters, Bill wrote:
        > I see that I can use the 2html.vim script to convert a source file into
        > a HTML file with the Vim syntax highlighting, using the following
        > command:
        >
        > :runtime! syntax/2html.vim
        >
        > What is the best way to do this with several files at once?
        >
        > Thanks,
        > Bill

        (untested)
        :args foo*
        :argdo runtime! syntax/2html.vim | update


        Best regards,
        Tony.
        --
        Be braver -- you can't cross a chasm in two small jumps.

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Waters, Bill
        Thanks. Unfortunately, I am doing this on multiple files with a diverse set of file extensions. And there are other files in the same directory that I don t
        Message 3 of 16 , Dec 21, 2007
          Thanks.

          Unfortunately, I am doing this on multiple files with a diverse set of
          file extensions. And there are other files in the same directory that I
          don't want to perform this on. It is easy enough for me to drag-drop
          the specific files that I want to generate HTML from. Once I have done
          that, is there a way to run this on all the files buffered in Vim?

          This will be a good lesson in how to do this sort of thing in general
          for me...

          --Bill


          -----Original Message-----
          From: vim_use@... [mailto:vim_use@...] On
          Behalf Of Tony Mechelynck
          Sent: Thursday, December 20, 2007 8:07 PM
          To: vim_use@...
          Subject: Re: HTML file with the Vim syntax highlighting


          Waters, Bill wrote:
          > I see that I can use the 2html.vim script to convert a source file
          into
          > a HTML file with the Vim syntax highlighting, using the following
          > command:
          >
          > :runtime! syntax/2html.vim
          >
          > What is the best way to do this with several files at once?
          >
          > Thanks,
          > Bill

          (untested)
          :args foo*
          :argdo runtime! syntax/2html.vim | update


          Best regards,
          Tony.
          --
          Be braver -- you can't cross a chasm in two small jumps.



          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Gustavo Duarte
          Hi Bill, You might want to try Iris from http://duartes.org/iris/ It is a stand-alone command-line tool that does syntax highlighting using the same syntax
          Message 4 of 16 , Dec 21, 2007
            Hi Bill,

            You might want to try Iris from http://duartes.org/iris/

            It is a stand-alone command-line tool that does syntax highlighting using the same syntax files as Vim. It can process wild cards in the command line, and knows how to choose the syntax based on the file extension (and only the file extension).

            Another advantage is that it's a lot faster than 2html.vim, as in some 10x or more faster. One disadvantage is that right now it works in Windows only, although I hope to get it working on Mono when I have some free time.

            cheers,
            Gustavo

            On Dec 21, 2007 9:47 AM, Waters, Bill <waters@...> wrote:

            Thanks.

            Unfortunately, I am doing this on multiple files with a diverse set of
            file extensions.  And there are other files in the same directory that I
            don't want to perform this on.  It is easy enough for me to drag-drop
            the specific files that I want to generate HTML from.  Once I have done
            that, is there a way to run this on all the files buffered in Vim?

            This will be a good lesson in how to do this sort of thing in general
            for me...

            --Bill


            -----Original Message-----
            From: vim_use@... [mailto: vim_use@...] On
            Behalf Of Tony Mechelynck
            Sent: Thursday, December 20, 2007 8:07 PM
            To: vim_use@...
            Subject: Re: HTML file with the Vim syntax highlighting


            Waters, Bill wrote:
            > I see that I can use the 2html.vim script to convert a source file
            into
            > a HTML file with the Vim syntax highlighting, using the following
            > command:
            >
            >     :runtime! syntax/2html.vim
            >
            > What is the best way to do this with several files at once?
            >
            > Thanks,
            > Bill

            (untested)
                   :args foo*
                   :argdo runtime! syntax/2html.vim | update


            Best regards,
            Tony.
            --
            Be braver -- you can't cross a chasm in two small jumps.



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

          • Tony Mechelynck
            ... Depending on what drag-drop produces, see ... The :argdo prefix applies the following commands to all files which are part of the arguments list (i.e.,
            Message 5 of 16 , Dec 21, 2007
              Waters, Bill wrote:
              > -----Original Message-----
              > From: vim_use@... [mailto:vim_use@...] On
              > Behalf Of Tony Mechelynck
              > Sent: Thursday, December 20, 2007 8:07 PM
              > To: vim_use@...
              > Subject: Re: HTML file with the Vim syntax highlighting
              >
              >
              > Waters, Bill wrote:
              >> I see that I can use the 2html.vim script to convert a source file
              > into
              >> a HTML file with the Vim syntax highlighting, using the following
              >> command:
              >>
              >> :runtime! syntax/2html.vim
              >>
              >> What is the best way to do this with several files at once?
              >>
              >> Thanks,
              >> Bill
              >
              > (untested)
              > :args foo*
              > :argdo runtime! syntax/2html.vim | update
              >
              >
              > Best regards,
              > Tony.



              > Thanks.
              >
              > Unfortunately, I am doing this on multiple files with a diverse set of
              > file extensions. And there are other files in the same directory that I
              > don't want to perform this on. It is easy enough for me to drag-drop
              > the specific files that I want to generate HTML from. Once I have done
              > that, is there a way to run this on all the files buffered in Vim?
              >
              > This will be a good lesson in how to do this sort of thing in general
              > for me...
              >
              > --Bill
              >
              >

              Depending on what drag-drop produces, see

              :help :argdo
              :help :windo
              :help :bufdo

              The ":argdo" prefix applies the following commands to all files which are part
              of the arguments list (i.e., mentioned on the Vim command-line or added by
              ":args", ":argadd" etc.). ":windo" applies to all files open in a (split)
              window. ":bufdo" applies to all files open in a "buffer", loaded or not,
              hidden or not, as listed by the ":ls" command. I don't think though, that
              ":runtime! syntax/2html.vim" is allowed as an argument of ":bufdo" or
              ":windo", since it creates a new file by opening a new window. You may have to
              create a new arguments list according to which files you have selected:

              :argdel *
              :argadd file1
              :argadd file2
              ...
              :argadd filen
              :argdo runtime! syntax/2html.vim | update

              (Note: I think the above will work, but I haven't tried it.)


              Best regards,
              Tony.
              --
              Physicists do it with charm

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Sam Habiel
              There is a problem with the plug-in though: it produces non-standard compliant HTML. Look at all the tags. Sam ...
              Message 6 of 16 , Dec 21, 2007
                There is a problem with the plug-in though: it produces non-standard
                compliant HTML. Look at all the <font> tags.

                Sam

                On Dec 21, 2007 12:51 PM, Tony Mechelynck <antoine.mechelynck@...> wrote:
                >
                >
                > Waters, Bill wrote:
                > > -----Original Message-----
                > > From: vim_use@... [mailto:vim_use@...] On
                > > Behalf Of Tony Mechelynck
                > > Sent: Thursday, December 20, 2007 8:07 PM
                > > To: vim_use@...
                > > Subject: Re: HTML file with the Vim syntax highlighting
                > >
                > >
                > > Waters, Bill wrote:
                > >> I see that I can use the 2html.vim script to convert a source file
                > > into
                > >> a HTML file with the Vim syntax highlighting, using the following
                > >> command:
                > >>
                > >> :runtime! syntax/2html.vim
                > >>
                > >> What is the best way to do this with several files at once?
                > >>
                > >> Thanks,
                > >> Bill
                > >
                > > (untested)
                > > :args foo*
                > > :argdo runtime! syntax/2html.vim | update
                > >
                > >
                > > Best regards,
                > > Tony.
                >
                >
                >
                > > Thanks.
                > >
                > > Unfortunately, I am doing this on multiple files with a diverse set of
                > > file extensions. And there are other files in the same directory that I
                > > don't want to perform this on. It is easy enough for me to drag-drop
                > > the specific files that I want to generate HTML from. Once I have done
                > > that, is there a way to run this on all the files buffered in Vim?
                > >
                > > This will be a good lesson in how to do this sort of thing in general
                > > for me...
                > >
                > > --Bill
                > >
                > >
                >
                > Depending on what drag-drop produces, see
                >
                > :help :argdo
                > :help :windo
                > :help :bufdo
                >
                > The ":argdo" prefix applies the following commands to all files which are part
                > of the arguments list (i.e., mentioned on the Vim command-line or added by
                > ":args", ":argadd" etc.). ":windo" applies to all files open in a (split)
                > window. ":bufdo" applies to all files open in a "buffer", loaded or not,
                > hidden or not, as listed by the ":ls" command. I don't think though, that
                > ":runtime! syntax/2html.vim" is allowed as an argument of ":bufdo" or
                > ":windo", since it creates a new file by opening a new window. You may have to
                > create a new arguments list according to which files you have selected:
                >
                > :argdel *
                > :argadd file1
                > :argadd file2
                > ...
                > :argadd filen
                > :argdo runtime! syntax/2html.vim | update
                >
                > (Note: I think the above will work, but I haven't tried it.)
                >
                >
                > Best regards,
                > Tony.
                > --
                > Physicists do it with charm
                >
                >
                > >
                >

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Tony Mechelynck
                ... tags are standard-compliant -- for older versions of the standards, including, IIUC, HTML 4.01 Transitional and maybe some later versions. To
                Message 7 of 16 , Dec 21, 2007
                  Sam Habiel wrote:
                  > There is a problem with the plug-in though: it produces non-standard
                  > compliant HTML. Look at all the <font> tags.
                  >
                  > Sam

                  The following comes from ":help 2html.vim", only you may need to scroll to see it:

                  > By default, HTML optimized for old browsers is generated. If you prefer using
                  > cascading style sheets (CSS1) for the attributes (resulting in considerably
                  > shorter and valid HTML 4 file), use: >
                  > :let html_use_css = 1

                  <font> tags are standard-compliant -- for older versions of the standards,
                  including, IIUC, HTML 4.01 "Transitional" and maybe some later versions.

                  To avoid them in favour of CSS, use the above-mentioned variable.


                  Best regards,
                  Tony.
                  --
                  After a few boring years, socially meaningful rock 'n' roll died out.
                  It was replaced by disco, which offers no guidance to any form of life
                  more advanced than the lichen family.
                  -- Dave Barry, "Kids Today: They Don't Know Dum Diddly
                  Do"


                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • MM
                  The way I convert multiple files from command line is gvim -f + syn on + so /usr/share/vim/vim63/syntax/2html.vim + wq + q *.cpp ...
                  Message 8 of 16 , Dec 24, 2007
                    The way I convert multiple files from command line is

                    gvim -f +"syn on" +"so /usr/share/vim/vim63/syntax/2html.vim" +"wq" +"q" *.cpp

                    On Dec 21, 2007 10:17 PM, Waters, Bill <waters@...> wrote:
                    >
                    > Thanks.
                    >
                    > Unfortunately, I am doing this on multiple files with a diverse set of
                    > file extensions. And there are other files in the same directory that I
                    > don't want to perform this on. It is easy enough for me to drag-drop
                    > the specific files that I want to generate HTML from. Once I have done
                    > that, is there a way to run this on all the files buffered in Vim?
                    >
                    > This will be a good lesson in how to do this sort of thing in general
                    > for me...
                    >
                    > --Bill
                    >
                    >
                    >
                    > -----Original Message-----
                    > From: vim_use@... [mailto:vim_use@...] On
                    > Behalf Of Tony Mechelynck
                    > Sent: Thursday, December 20, 2007 8:07 PM
                    > To: vim_use@...
                    > Subject: Re: HTML file with the Vim syntax highlighting
                    >
                    >
                    > Waters, Bill wrote:
                    > > I see that I can use the 2html.vim script to convert a source file
                    > into
                    > > a HTML file with the Vim syntax highlighting, using the following
                    > > command:
                    > >
                    > > :runtime! syntax/2html.vim
                    > >
                    > > What is the best way to do this with several files at once?
                    > >
                    > > Thanks,
                    > > Bill
                    >
                    > (untested)
                    > :args foo*
                    > :argdo runtime! syntax/2html.vim | update
                    >
                    >
                    > Best regards,
                    > Tony.
                    > --
                    > Be braver -- you can't cross a chasm in two small jumps.
                    >
                    >
                    >
                    > >
                    >

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_use" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Waters, Bill
                    ... Behalf Of Tony Mechelynck ... of ... that I ... drag-drop ... done ... general ... are part ... by ... (split) ... not, ... that ... have to ... Using
                    Message 9 of 16 , Dec 26, 2007
                      >-----Original Message-----
                      >From: vim_use@... [mailto:vim_use@...] On
                      Behalf Of Tony Mechelynck
                      >Sent: Friday, December 21, 2007 2:52 PM
                      >To: vim_use@...
                      >Subject: Re: HTML file with the Vim syntax highlighting
                      >
                      >
                      >Waters, Bill wrote:
                      >> -----Original Message-----
                      >> From: vim_use@... [mailto:vim_use@...] On
                      >> Behalf Of Tony Mechelynck
                      >> Sent: Thursday, December 20, 2007 8:07 PM
                      >> To: vim_use@...
                      >> Subject: Re: HTML file with the Vim syntax highlighting
                      >>
                      >>
                      >> Waters, Bill wrote:
                      >>> I see that I can use the 2html.vim script to convert a source file
                      >> into
                      >>> a HTML file with the Vim syntax highlighting, using the following
                      >>> command:
                      >>>
                      >>> :runtime! syntax/2html.vim
                      >>>
                      >>> What is the best way to do this with several files at once?
                      >>>
                      >>> Thanks,
                      >>> Bill
                      >>
                      >> (untested)
                      >> :args foo*
                      >> :argdo runtime! syntax/2html.vim | update
                      >>
                      >>
                      >> Best regards,
                      >> Tony.
                      >
                      >
                      >
                      > > Thanks.
                      > >
                      > > Unfortunately, I am doing this on multiple files with a diverse set
                      of
                      > > file extensions. And there are other files in the same directory
                      that I
                      > > don't want to perform this on. It is easy enough for me to
                      drag-drop
                      > > the specific files that I want to generate HTML from. Once I have
                      done
                      > > that, is there a way to run this on all the files buffered in Vim?
                      > >
                      > > This will be a good lesson in how to do this sort of thing in
                      general
                      > > for me...
                      > >
                      > > --Bill
                      > >
                      > >
                      >
                      >Depending on what drag-drop produces, see
                      >
                      > :help :argdo
                      > :help :windo
                      > :help :bufdo
                      >
                      >The ":argdo" prefix applies the following commands to all files which
                      are part
                      >of the arguments list (i.e., mentioned on the Vim command-line or added
                      by
                      >":args", ":argadd" etc.). ":windo" applies to all files open in a
                      (split)
                      >window. ":bufdo" applies to all files open in a "buffer", loaded or
                      not,
                      >hidden or not, as listed by the ":ls" command. I don't think though,
                      that
                      >":runtime! syntax/2html.vim" is allowed as an argument of ":bufdo" or
                      >":windo", since it creates a new file by opening a new window. You may
                      have to
                      >create a new arguments list according to which files you have selected:
                      >
                      > :argdel *
                      > :argadd file1
                      > :argadd file2
                      > ...
                      > :argadd filen
                      > :argdo runtime! syntax/2html.vim | update
                      >
                      >(Note: I think the above will work, but I haven't tried it.)
                      >
                      >
                      >Best regards,
                      >Tony.
                      >--

                      Using ":argdo runtime! syntax/2html.vim | update" almost works. An HTML
                      file is created for each file in the argument list, but only the HTML
                      file for the first file in the list is syntax highlighted. I am
                      drag-dropping the files into gvim in Windows.



                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_use" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    • Tony Mechelynck
                      ... Akhh... The Syntax autocommand is added to eventignore while argdo is running, so all syntax highlighting is bypassed. What about, instead (and still
                      Message 10 of 16 , Dec 26, 2007
                        Waters, Bill wrote:
                        >> -----Original Message-----
                        >> From: vim_use@... [mailto:vim_use@...] On
                        > Behalf Of Tony Mechelynck
                        >> Sent: Friday, December 21, 2007 2:52 PM
                        >> To: vim_use@...
                        >> Subject: Re: HTML file with the Vim syntax highlighting
                        >>
                        >>
                        >> Waters, Bill wrote:
                        >>> -----Original Message-----
                        >>> From: vim_use@... [mailto:vim_use@...] On
                        >>> Behalf Of Tony Mechelynck
                        >>> Sent: Thursday, December 20, 2007 8:07 PM
                        >>> To: vim_use@...
                        >>> Subject: Re: HTML file with the Vim syntax highlighting
                        >>>
                        >>>
                        >>> Waters, Bill wrote:
                        >>>> I see that I can use the 2html.vim script to convert a source file
                        >>> into
                        >>>> a HTML file with the Vim syntax highlighting, using the following
                        >>>> command:
                        >>>>
                        >>>> :runtime! syntax/2html.vim
                        >>>>
                        >>>> What is the best way to do this with several files at once?
                        >>>>
                        >>>> Thanks,
                        >>>> Bill
                        >>> (untested)
                        >>> :args foo*
                        >>> :argdo runtime! syntax/2html.vim | update
                        >>>
                        >>>
                        >>> Best regards,
                        >>> Tony.
                        >>
                        >>
                        >>> Thanks.
                        >>>
                        >>> Unfortunately, I am doing this on multiple files with a diverse set
                        > of
                        >>> file extensions. And there are other files in the same directory
                        > that I
                        >>> don't want to perform this on. It is easy enough for me to
                        > drag-drop
                        >>> the specific files that I want to generate HTML from. Once I have
                        > done
                        >>> that, is there a way to run this on all the files buffered in Vim?
                        >>>
                        >>> This will be a good lesson in how to do this sort of thing in
                        > general
                        >>> for me...
                        >>>
                        >>> --Bill
                        >>>
                        >>>
                        >> Depending on what drag-drop produces, see
                        >>
                        >> :help :argdo
                        >> :help :windo
                        >> :help :bufdo
                        >>
                        >> The ":argdo" prefix applies the following commands to all files which
                        > are part
                        >> of the arguments list (i.e., mentioned on the Vim command-line or added
                        > by
                        >> ":args", ":argadd" etc.). ":windo" applies to all files open in a
                        > (split)
                        >> window. ":bufdo" applies to all files open in a "buffer", loaded or
                        > not,
                        >> hidden or not, as listed by the ":ls" command. I don't think though,
                        > that
                        >> ":runtime! syntax/2html.vim" is allowed as an argument of ":bufdo" or
                        >> ":windo", since it creates a new file by opening a new window. You may
                        > have to
                        >> create a new arguments list according to which files you have selected:
                        >>
                        >> :argdel *
                        >> :argadd file1
                        >> :argadd file2
                        >> ...
                        >> :argadd filen
                        >> :argdo runtime! syntax/2html.vim | update
                        >>
                        >> (Note: I think the above will work, but I haven't tried it.)
                        >>
                        >>
                        >> Best regards,
                        >> Tony.
                        >> --
                        >
                        > Using ":argdo runtime! syntax/2html.vim | update" almost works. An HTML
                        > file is created for each file in the argument list, but only the HTML
                        > file for the first file in the list is syntax highlighted. I am
                        > drag-dropping the files into gvim in Windows.

                        Akhh... The Syntax autocommand is added to 'eventignore' while argdo is
                        running, so all syntax highlighting is bypassed. What about, instead (and
                        still untested)

                        :argdo doau Syntax | runtime! syntax/2html.vim | update

                        to try and force the syntax highlighting to happen.


                        Best regards,
                        Tony.
                        --
                        Weinberg's First Law:
                        Progress is made on alternate Fridays.

                        --~--~---------~--~----~------------~-------~--~----~
                        You received this message from the "vim_use" maillist.
                        For more information, visit http://www.vim.org/maillist.php
                        -~----------~----~----~----~------~----~------~--~---
                      • Waters, Bill
                        ... Behalf Of Tony Mechelynck ... which ... added ... or ... may ... HTML ... (and ... I thought you would have some insight into why the syntax highlighting
                        Message 11 of 16 , Dec 26, 2007
                          >-----Original Message-----
                          >From: vim_use@... [mailto:vim_use@...] On
                          Behalf Of Tony Mechelynck
                          >Sent: Wednesday, December 26, 2007 2:43 PM
                          >To: vim_use@...
                          >Subject: Re: HTML file with the Vim syntax highlighting
                          >
                          >
                          >Waters, Bill wrote:
                          >>> -----Original Message-----
                          >>> From: vim_use@... [mailto:vim_use@...] On
                          >> Behalf Of Tony Mechelynck
                          >>> Sent: Friday, December 21, 2007 2:52 PM
                          >>> To: vim_use@...
                          >>> Subject: Re: HTML file with the Vim syntax highlighting
                          >>>
                          >>>
                          >>> Waters, Bill wrote:
                          >>>> -----Original Message-----
                          >>>> From: vim_use@... [mailto:vim_use@...] On
                          >>>> Behalf Of Tony Mechelynck
                          >>>> Sent: Thursday, December 20, 2007 8:07 PM
                          >>>> To: vim_use@...
                          >>>> Subject: Re: HTML file with the Vim syntax highlighting
                          >>>>
                          >>>>
                          >>>> Waters, Bill wrote:
                          >>>>> I see that I can use the 2html.vim script to convert a source file
                          >>>> into
                          >>>>> a HTML file with the Vim syntax highlighting, using the following
                          >>>>> command:
                          >>>>>
                          >>>>> :runtime! syntax/2html.vim
                          >>>>>
                          >>>>> What is the best way to do this with several files at once?
                          >>>>>
                          >>>>> Thanks,
                          >>>>> Bill
                          >>>> (untested)
                          >>>> :args foo*
                          >>>> :argdo runtime! syntax/2html.vim | update
                          >>>>
                          >>>>
                          >>>> Best regards,
                          >>>> Tony.
                          >>>
                          >>>
                          >>>> Thanks.
                          >>>>
                          >>>> Unfortunately, I am doing this on multiple files with a diverse set
                          >> of
                          >>>> file extensions. And there are other files in the same directory
                          >> that I
                          >>>> don't want to perform this on. It is easy enough for me to
                          >> drag-drop
                          >>>> the specific files that I want to generate HTML from. Once I have
                          >> done
                          >>>> that, is there a way to run this on all the files buffered in Vim?
                          >>>>
                          >>>> This will be a good lesson in how to do this sort of thing in
                          >> general
                          >>>> for me...
                          >>>>
                          >>>> --Bill
                          >>>>
                          >>>>
                          >>> Depending on what drag-drop produces, see
                          >>>
                          >>> :help :argdo
                          >>> :help :windo
                          >>> :help :bufdo
                          >>>
                          >>> The ":argdo" prefix applies the following commands to all files
                          which
                          >> are part
                          >>> of the arguments list (i.e., mentioned on the Vim command-line or
                          added
                          >> by
                          >>> ":args", ":argadd" etc.). ":windo" applies to all files open in a
                          >> (split)
                          >>> window. ":bufdo" applies to all files open in a "buffer", loaded or
                          >> not,
                          >>> hidden or not, as listed by the ":ls" command. I don't think though,
                          >> that
                          >>> ":runtime! syntax/2html.vim" is allowed as an argument of ":bufdo"
                          or
                          >>> ":windo", since it creates a new file by opening a new window. You
                          may
                          >> have to
                          >>> create a new arguments list according to which files you have
                          selected:
                          >>>
                          >>> :argdel *
                          >>> :argadd file1
                          >>> :argadd file2
                          >>> ...
                          >>> :argadd filen
                          >>> :argdo runtime! syntax/2html.vim | update
                          >>>
                          >>> (Note: I think the above will work, but I haven't tried it.)
                          >>>
                          >>>
                          >>> Best regards,
                          >>> Tony.
                          >>> --
                          >>
                          >> Using ":argdo runtime! syntax/2html.vim | update" almost works. An
                          HTML
                          >> file is created for each file in the argument list, but only the HTML
                          >> file for the first file in the list is syntax highlighted. I am
                          >> drag-dropping the files into gvim in Windows.
                          >
                          >Akhh... The Syntax autocommand is added to 'eventignore' while argdo is

                          >running, so all syntax highlighting is bypassed. What about, instead
                          (and
                          >still untested)
                          >
                          > :argdo doau Syntax | runtime! syntax/2html.vim | update
                          >
                          >to try and force the syntax highlighting to happen.
                          >
                          >
                          >Best regards,
                          >Tony.
                          >--

                          I thought you would have some insight into why the syntax highlighting
                          was getting bypassed.

                          Unfortunately, I get the same result with this...

                          :argdo doau Syntax | runtime! syntax/2html.vim | update

                          --~--~---------~--~----~------------~-------~--~----~
                          You received this message from the "vim_use" maillist.
                          For more information, visit http://www.vim.org/maillist.php
                          -~----------~----~----~----~------~----~------~--~---
                        • Tony Mechelynck
                          ... Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 189. You put your e-mail address in the upper left-hand corner of envelopes.
                          Message 12 of 16 , Dec 26, 2007
                            Waters, Bill wrote:
                            >> -----Original Message-----
                            >> From: vim_use@... [mailto:vim_use@...] On
                            > Behalf Of Tony Mechelynck
                            >> Sent: Wednesday, December 26, 2007 2:43 PM
                            >> To: vim_use@...
                            >> Subject: Re: HTML file with the Vim syntax highlighting
                            >>
                            >>
                            >> Waters, Bill wrote:
                            >>>> -----Original Message-----
                            >>>> From: vim_use@... [mailto:vim_use@...] On
                            >>> Behalf Of Tony Mechelynck
                            >>>> Sent: Friday, December 21, 2007 2:52 PM
                            >>>> To: vim_use@...
                            >>>> Subject: Re: HTML file with the Vim syntax highlighting
                            >>>>
                            >>>>
                            >>>> Waters, Bill wrote:
                            >>>>> -----Original Message-----
                            >>>>> From: vim_use@... [mailto:vim_use@...] On
                            >>>>> Behalf Of Tony Mechelynck
                            >>>>> Sent: Thursday, December 20, 2007 8:07 PM
                            >>>>> To: vim_use@...
                            >>>>> Subject: Re: HTML file with the Vim syntax highlighting
                            >>>>>
                            >>>>>
                            >>>>> Waters, Bill wrote:
                            >>>>>> I see that I can use the 2html.vim script to convert a source file
                            >>>>> into
                            >>>>>> a HTML file with the Vim syntax highlighting, using the following
                            >>>>>> command:
                            >>>>>>
                            >>>>>> :runtime! syntax/2html.vim
                            >>>>>>
                            >>>>>> What is the best way to do this with several files at once?
                            >>>>>>
                            >>>>>> Thanks,
                            >>>>>> Bill
                            >>>>> (untested)
                            >>>>> :args foo*
                            >>>>> :argdo runtime! syntax/2html.vim | update
                            >>>>>
                            >>>>>
                            >>>>> Best regards,
                            >>>>> Tony.
                            >>>>
                            >>>>> Thanks.
                            >>>>>
                            >>>>> Unfortunately, I am doing this on multiple files with a diverse set
                            >>> of
                            >>>>> file extensions. And there are other files in the same directory
                            >>> that I
                            >>>>> don't want to perform this on. It is easy enough for me to
                            >>> drag-drop
                            >>>>> the specific files that I want to generate HTML from. Once I have
                            >>> done
                            >>>>> that, is there a way to run this on all the files buffered in Vim?
                            >>>>>
                            >>>>> This will be a good lesson in how to do this sort of thing in
                            >>> general
                            >>>>> for me...
                            >>>>>
                            >>>>> --Bill
                            >>>>>
                            >>>>>
                            >>>> Depending on what drag-drop produces, see
                            >>>>
                            >>>> :help :argdo
                            >>>> :help :windo
                            >>>> :help :bufdo
                            >>>>
                            >>>> The ":argdo" prefix applies the following commands to all files
                            > which
                            >>> are part
                            >>>> of the arguments list (i.e., mentioned on the Vim command-line or
                            > added
                            >>> by
                            >>>> ":args", ":argadd" etc.). ":windo" applies to all files open in a
                            >>> (split)
                            >>>> window. ":bufdo" applies to all files open in a "buffer", loaded or
                            >>> not,
                            >>>> hidden or not, as listed by the ":ls" command. I don't think though,
                            >>> that
                            >>>> ":runtime! syntax/2html.vim" is allowed as an argument of ":bufdo"
                            > or
                            >>>> ":windo", since it creates a new file by opening a new window. You
                            > may
                            >>> have to
                            >>>> create a new arguments list according to which files you have
                            > selected:
                            >>>> :argdel *
                            >>>> :argadd file1
                            >>>> :argadd file2
                            >>>> ...
                            >>>> :argadd filen
                            >>>> :argdo runtime! syntax/2html.vim | update
                            >>>>
                            >>>> (Note: I think the above will work, but I haven't tried it.)
                            >>>>
                            >>>>
                            >>>> Best regards,
                            >>>> Tony.
                            >>>> --
                            >>> Using ":argdo runtime! syntax/2html.vim | update" almost works. An
                            > HTML
                            >>> file is created for each file in the argument list, but only the HTML
                            >>> file for the first file in the list is syntax highlighted. I am
                            >>> drag-dropping the files into gvim in Windows.
                            >> Akhh... The Syntax autocommand is added to 'eventignore' while argdo is
                            >
                            >> running, so all syntax highlighting is bypassed. What about, instead
                            > (and
                            >> still untested)
                            >>
                            >> :argdo doau Syntax | runtime! syntax/2html.vim | update
                            >>
                            >> to try and force the syntax highlighting to happen.
                            >>
                            >>
                            >> Best regards,
                            >> Tony.
                            >> --
                            >
                            > I thought you would have some insight into why the syntax highlighting
                            > was getting bypassed.
                            >
                            > Unfortunately, I get the same result with this...
                            >
                            > :argdo doau Syntax | runtime! syntax/2html.vim | update

                            I found that reason by reading ":help :argdo". OK, let's try a variation:

                            :argdo set eventignore-=Syntax | runtime! syntax/2html.vim | update


                            Best regards,
                            Tony.
                            --
                            hundred-and-one symptoms of being an internet addict:
                            189. You put your e-mail address in the upper left-hand corner of envelopes.

                            --~--~---------~--~----~------------~-------~--~----~
                            You received this message from the "vim_use" maillist.
                            For more information, visit http://www.vim.org/maillist.php
                            -~----------~----~----~----~------~----~------~--~---
                          • Tim Chase
                            ... You might try tinkering with the eventignore setting which gets temporarily overloaded on this. I believe the pseudo logic for the argdo/bufdo commands
                            Message 13 of 16 , Dec 26, 2007
                              >> :argdo doau Syntax | runtime! syntax/2html.vim | update
                              >>
                              >> to try and force the syntax highlighting to happen.
                              >
                              > I thought you would have some insight into why the syntax highlighting
                              > was getting bypassed.
                              >
                              > Unfortunately, I get the same result with this...
                              >
                              > :argdo doau Syntax | runtime! syntax/2html.vim | update


                              You might try tinkering with the 'eventignore' setting which gets
                              temporarily overloaded on this. I believe the pseudo logic for the
                              argdo/bufdo commands are something like

                              let old_ei = &ei
                              set ei+=Syntax
                              [do argdo/bufdo stuff]
                              let &ei=old_ei

                              I think the command to fix solve it is something like

                              argdo set ei-=Syntax | runtime! ... | update

                              I had problems with this using "windo" before it was fixed in patch
                              6.2.326 You might have to set the filetype in there too before you make
                              your "runtime" call.

                              -tim




                              --~--~---------~--~----~------------~-------~--~----~
                              You received this message from the "vim_use" maillist.
                              For more information, visit http://www.vim.org/maillist.php
                              -~----------~----~----~----~------~----~------~--~---
                            • Waters, Bill
                              ... Behalf Of Tony Mechelynck ... On ... On ... file ... following ... set ... have ... Vim? ... or ... though, ... HTML ... is ... highlighting ... update ...
                              Message 14 of 16 , Dec 26, 2007
                                >-----Original Message-----
                                >From: vim_use@... [mailto:vim_use@...] On
                                Behalf Of Tony Mechelynck
                                >Sent: Wednesday, December 26, 2007 2:59 PM
                                >To: vim_use@...
                                >Subject: Re: HTML file with the Vim syntax highlighting
                                >
                                >
                                >Waters, Bill wrote:
                                >>> -----Original Message-----
                                >>> From: vim_use@... [mailto:vim_use@...] On
                                >> Behalf Of Tony Mechelynck
                                >>> Sent: Wednesday, December 26, 2007 2:43 PM
                                >>> To: vim_use@...
                                >>> Subject: Re: HTML file with the Vim syntax highlighting
                                >>>
                                >>>
                                >>> Waters, Bill wrote:
                                >>>>> -----Original Message-----
                                >>>>> From: vim_use@... [mailto:vim_use@...]
                                On
                                >>>> Behalf Of Tony Mechelynck
                                >>>>> Sent: Friday, December 21, 2007 2:52 PM
                                >>>>> To: vim_use@...
                                >>>>> Subject: Re: HTML file with the Vim syntax highlighting
                                >>>>>
                                >>>>>
                                >>>>> Waters, Bill wrote:
                                >>>>>> -----Original Message-----
                                >>>>>> From: vim_use@... [mailto:vim_use@...]
                                On
                                >>>>>> Behalf Of Tony Mechelynck
                                >>>>>> Sent: Thursday, December 20, 2007 8:07 PM
                                >>>>>> To: vim_use@...
                                >>>>>> Subject: Re: HTML file with the Vim syntax highlighting
                                >>>>>>
                                >>>>>>
                                >>>>>> Waters, Bill wrote:
                                >>>>>>> I see that I can use the 2html.vim script to convert a source
                                file
                                >>>>>> into
                                >>>>>>> a HTML file with the Vim syntax highlighting, using the
                                following
                                >>>>>>> command:
                                >>>>>>>
                                >>>>>>> :runtime! syntax/2html.vim
                                >>>>>>>
                                >>>>>>> What is the best way to do this with several files at once?
                                >>>>>>>
                                >>>>>>> Thanks,
                                >>>>>>> Bill
                                >>>>>> (untested)
                                >>>>>> :args foo*
                                >>>>>> :argdo runtime! syntax/2html.vim | update
                                >>>>>>
                                >>>>>>
                                >>>>>> Best regards,
                                >>>>>> Tony.
                                >>>>>
                                >>>>>> Thanks.
                                >>>>>>
                                >>>>>> Unfortunately, I am doing this on multiple files with a diverse
                                set
                                >>>> of
                                >>>>>> file extensions. And there are other files in the same directory
                                >>>> that I
                                >>>>>> don't want to perform this on. It is easy enough for me to
                                >>>> drag-drop
                                >>>>>> the specific files that I want to generate HTML from. Once I
                                have
                                >>>> done
                                >>>>>> that, is there a way to run this on all the files buffered in
                                Vim?
                                >>>>>>
                                >>>>>> This will be a good lesson in how to do this sort of thing in
                                >>>> general
                                >>>>>> for me...
                                >>>>>>
                                >>>>>> --Bill
                                >>>>>>
                                >>>>>>
                                >>>>> Depending on what drag-drop produces, see
                                >>>>>
                                >>>>> :help :argdo
                                >>>>> :help :windo
                                >>>>> :help :bufdo
                                >>>>>
                                >>>>> The ":argdo" prefix applies the following commands to all files
                                >> which
                                >>>> are part
                                >>>>> of the arguments list (i.e., mentioned on the Vim command-line or
                                >> added
                                >>>> by
                                >>>>> ":args", ":argadd" etc.). ":windo" applies to all files open in a
                                >>>> (split)
                                >>>>> window. ":bufdo" applies to all files open in a "buffer", loaded
                                or
                                >>>> not,
                                >>>>> hidden or not, as listed by the ":ls" command. I don't think
                                though,
                                >>>> that
                                >>>>> ":runtime! syntax/2html.vim" is allowed as an argument of ":bufdo"
                                >> or
                                >>>>> ":windo", since it creates a new file by opening a new window. You
                                >> may
                                >>>> have to
                                >>>>> create a new arguments list according to which files you have
                                >> selected:
                                >>>>> :argdel *
                                >>>>> :argadd file1
                                >>>>> :argadd file2
                                >>>>> ...
                                >>>>> :argadd filen
                                >>>>> :argdo runtime! syntax/2html.vim | update
                                >>>>>
                                >>>>> (Note: I think the above will work, but I haven't tried it.)
                                >>>>>
                                >>>>>
                                >>>>> Best regards,
                                >>>>> Tony.
                                >>>>> --
                                >>>> Using ":argdo runtime! syntax/2html.vim | update" almost works. An
                                >> HTML
                                >>>> file is created for each file in the argument list, but only the
                                HTML
                                >>>> file for the first file in the list is syntax highlighted. I am
                                >>>> drag-dropping the files into gvim in Windows.
                                >>> Akhh... The Syntax autocommand is added to 'eventignore' while argdo
                                is
                                >>
                                >>> running, so all syntax highlighting is bypassed. What about, instead
                                >> (and
                                >>> still untested)
                                >>>
                                >>> :argdo doau Syntax | runtime! syntax/2html.vim | update
                                >>>
                                >>> to try and force the syntax highlighting to happen.
                                >>>
                                >>>
                                >>> Best regards,
                                >>> Tony.
                                >>> --
                                >>
                                >> I thought you would have some insight into why the syntax
                                highlighting
                                >> was getting bypassed.
                                >>
                                >> Unfortunately, I get the same result with this...
                                >>
                                >> :argdo doau Syntax | runtime! syntax/2html.vim | update
                                >
                                >I found that reason by reading ":help :argdo". OK, let's try a
                                variation:
                                >
                                > :argdo set eventignore-=Syntax | runtime! syntax/2html.vim |
                                update
                                >
                                >
                                >Best regards,
                                >Tony.
                                >--

                                That got it... thanks!

                                --~--~---------~--~----~------------~-------~--~----~
                                You received this message from the "vim_use" maillist.
                                For more information, visit http://www.vim.org/maillist.php
                                -~----------~----~----~----~------~----~------~--~---
                              • Leah
                                I know it is a little off topics but both seem to be in same category and I dont wanna open a new topic. Thus,... I m using version 6.2, and recently just
                                Message 15 of 16 , Jan 2, 2008
                                  I know it is a little off topics but both seem to be in same category
                                  and I dont wanna open a new topic. Thus,...

                                  I'm using version 6.2, and recently just downloaded and installed the
                                  following files in $HOME/.vim/indent/ and $HOME/.vim/syntax/
                                  respectively, to support PHP5 and folding expecially:

                                  indent file: php.vim version 1.23 from http://www.vim.org/scripts/script.php?script_id=1120
                                  syntax file: php.vim version 0.9.6 from http://www.vim.org/scripts/script.php?script_id=1571

                                  But it keeps generating the following errors, not to mention the
                                  folding completely not working under php scripts!

                                  Any ideas what going on?


                                  <code>
                                  Error detected while processing /Volumes/Users/leah/.vim/syntax/
                                  php.vim:
                                  line 1621:
                                  E56: * operand could be empty
                                  E475: Invalid argument: phpSemicolonError contained display extend ";\%
                                  (\%(\_s*\%(//.*$\|#.*$\|/\*\_.\{-}\*/\)\@>\)*\)\@>\_s*\%([.*/\^|&,:!
                                  =<>]\|?>\@!\|++\@!\|--\@!\)"
                                  containedin=phpSemicolon
                                  Error detected while processing function <SNR>13_pregPattern_S:
                                  line 1:
                                  E71: Invalid character after \%
                                  E475: Invalid argument: pregPattern_S matchgroup=pregDelimiter start=/\
                                  %x28/ end=/\%x29/ skip=/\\\{4}\|\\\\\=./ keepend extend contained
                                  nextgroup=pregOptionError_S
                                  E71: Invalid character after \%
                                  E475: Invalid argument: pregPattern_S matchgroup=pregDelimiter start=/\
                                  %x3C/ end=/\%x3E/ skip=/\\\{4}\|\\\\\=./ keepend extend contained
                                  nextgroup=pregOptionError_S
                                  E71: Invalid character after \%
                                  E475: Invalid argument: pregPattern_S matchgroup=pregDelimiter start=/\
                                  %x5B/ end=/\%x5D/ skip=/\\\{4}\|\\\\\=./ keepend extend contained
                                  nextgroup=pregOptionError_S
                                  E71: Invalid character after \%
                                  E475: Invalid argument: pregPattern_S matchgroup=pregDelimiter start=/\
                                  %x7B/ end=/\%x7D/ skip=/\\\{4}\|\\\\\=./ keepend extend contained
                                  nextgroup=pregOptionError_S
                                  Error detected while processing function <SNR>13_pregPattern_D:
                                  line 1:
                                  E71: Invalid character after \%
                                  E475: Invalid argument: pregPattern_D matchgroup=pregDelimiter start=/\
                                  %x28/ end=/\%x29/ skip=/\\\{4}\|\\\\\=./ keepend extend contained
                                  nextgroup=pregOptionError_D
                                  E71: Invalid character after \%
                                  E475: Invalid argument: pregPattern_D matchgroup=pregDelimiter start=/\
                                  %x3C/ end=/\%x3E/ skip=/\\\{4}\|\\\\\=./ keepend extend contained
                                  nextgroup=pregOptionError_D
                                  E71: Invalid character after \%
                                  E475: Invalid argument: pregPattern_D matchgroup=pregDelimiter start=/\
                                  %x5B/ end=/\%x5D/ skip=/\\\{4}\|\\\\\=./ keepend extend contained
                                  nextgroup=pregOptionError_D
                                  E71: Invalid character after \%
                                  E475: Invalid argument: pregPattern_D matchgroup=pregDelimiter start=/\
                                  %x7B/ end=/\%x7D/ skip=/\\\{4}\|\\\\\=./ keepend extend contained
                                  nextgroup=pregOptionError_D
                                  Hit ENTER or type command to continue
                                  <code \>
                                  --~--~---------~--~----~------------~-------~--~----~
                                  You received this message from the "vim_use" maillist.
                                  For more information, visit http://www.vim.org/maillist.php
                                  -~----------~----~----~----~------~----~------~--~---
                                • A.Politz
                                  ... I think your vim version is simply not supported by this plugins ( to old ). You could check the requirement fields on the vim.org site or look in the
                                  Message 16 of 16 , Jan 2, 2008
                                    Leah wrote:

                                    >I know it is a little off topics but both seem to be in same category
                                    >and I dont wanna open a new topic. Thus,...
                                    >
                                    >I'm using version 6.2, and recently just downloaded and installed the
                                    >following files in $HOME/.vim/indent/ and $HOME/.vim/syntax/
                                    >respectively, to support PHP5 and folding expecially:
                                    >
                                    >indent file: php.vim version 1.23 from http://www.vim.org/scripts/script.php?script_id=1120
                                    >syntax file: php.vim version 0.9.6 from http://www.vim.org/scripts/script.php?script_id=1571
                                    >
                                    >But it keeps generating the following errors, not to mention the
                                    >folding completely not working under php scripts!
                                    >
                                    >Any ideas what going on?
                                    >
                                    >
                                    >....
                                    >Error detected while processing function <SNR>13_pregPattern_S:
                                    >line 1:
                                    >E71: Invalid character after \%
                                    >....
                                    >
                                    >
                                    I think your vim version is simply not supported by
                                    this plugins ( to old ).

                                    You could check the requirement fields on the vim.org site
                                    or look in the script which character follows '\%' and
                                    confirm by `not finding this regex in the help file` that
                                    it was not supported in 6.2.

                                    -ap



                                    --
                                    Ich hab geträumt, der Krieg wär vorbei.


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