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

More request for 2html :)

Expand Messages
  • Wu, Yue
    Ok, 2html now has supported folding, thanks for nice work, so fantasic! Now, new feature request comes :) If 2html supports translating the tags jumping to
    Message 1 of 9 , Apr 29, 2009
    • 0 Attachment
      Ok, 2html now has supported folding, thanks for nice work, so fantasic! Now,
      new feature request comes :) If 2html supports translating the tags jumping
      to hypertext, it would be much more great.

      --
      Hi,
      Wu, Yue

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ben Fritz
      ... No doubt you re referring to the patch in this thread: http://groups.google.com/group/vim_dev/browse_thread/thread/84bcdc1a7e56e14d/23cb577db10fdbd3
      Message 2 of 9 , Apr 30, 2009
      • 0 Attachment
        On Apr 29, 10:22 pm, "Wu, Yue" <vano...@...> wrote:
        > Ok, 2html now has supported folding, thanks for nice work, so fantasic!

        No doubt you're referring to the patch in this thread:

        http://groups.google.com/group/vim_dev/browse_thread/thread/84bcdc1a7e56e14d/23cb577db10fdbd3

        Unfortunately, I notice it is still not in the official runtime. Last
        I heard, Bram was still looking for comments. I'm glad you've found it
        useful! I myself have used it a few times, once or twice to highlight
        sections of code for people, and a few times to record/distribute a
        syntax-highlighted and nicely folded :make output. I don't usually
        distribute any outlining or note taking that I've done in Vim, but if
        I did I'd probably use this feature for that as well.

        > new feature request comes :) If 2html supports translating the tags jumping
        > to hypertext, it would be much more great.
        >

        I think this would be extremely difficult to do right in Vim script,
        and it is hard to tell exactly how to go about it. I think it would be
        far beyond the scope of 2html.vim, and additionally (if I understand
        you correctly) this is a task that is already accomplished by many
        readily available tools. Just do a google search or poke around on
        sourceforge. "Tags jumping" is kind of open to interpretation, so I'm
        not sure exactly what you want, but there are tools to create html
        with embedded links, tree views, etc. based on all sorts of plaintext
        documents.
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Wu, Yue
        ... I have used it some time too from when you posted a full version here :) Still something I don t like: foldcolumn is too wide, actually I like to hide them
        Message 3 of 9 , Apr 30, 2009
        • 0 Attachment
          On Thu, Apr 30, 2009 at 07:05:53AM -0700, Ben Fritz wrote:
          >

          > On Apr 29, 10:22 pm, "Wu, Yue" <vano...@...> wrote:
          > > Ok, 2html now has supported folding, thanks for nice work, so fantasic!
          >
          > No doubt you're referring to the patch in this thread:
          >
          > http://groups.google.com/group/vim_dev/browse_thread/thread/84bcdc1a7e56e14d/23cb577db10fdbd3
          >
          > Unfortunately, I notice it is still not in the official runtime. Last
          > I heard, Bram was still looking for comments. I'm glad you've found it
          > useful! I myself have used it a few times, once or twice to highlight
          > sections of code for people, and a few times to record/distribute a
          > syntax-highlighted and nicely folded :make output. I don't usually
          > distribute any outlining or note taking that I've done in Vim, but if
          > I did I'd probably use this feature for that as well.

          I have used it some time too from when you posted a full version here :)

          Still something I don't like: foldcolumn is too wide, actually I like to hide
          them at all, and I think if I can click the header text of a level of folding
          to fold and unfold would be more convenient for using.

          >
          > > new feature request comes :) If 2html supports translating the tags jumping
          > > to hypertext, it would be much more great.
          > >
          >
          > I think this would be extremely difficult to do right in Vim script,
          > and it is hard to tell exactly how to go about it. I think it would be
          > far beyond the scope of 2html.vim, and additionally (if I understand
          > you correctly) this is a task that is already accomplished by many
          > readily available tools. Just do a google search or poke around on
          > sourceforge. "Tags jumping" is kind of open to interpretation, so I'm
          > not sure exactly what you want, but there are tools to create html
          > with embedded links, tree views, etc. based on all sorts of plaintext
          > documents.

          I don't know the web relating technology, but I think 2html can use the tag
          file of the current document, and then make all |foo| and *foo* in the
          document as a hypertext? Is it hard to implement?

          --
          Hi,
          Wu, Yue

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Ben Fritz
          ... In the discussions leading up to the patch, people liked the idea of clicking the text to toggle a fold, but we were having trouble figuring out what to do
          Message 4 of 9 , May 1, 2009
          • 0 Attachment
            On Apr 30, 5:11 pm, "Wu, Yue" <vano...@...> wrote:
            > On Thu, Apr 30, 2009 at 07:05:53AM -0700, Ben Fritz wrote:
            >
            > > On Apr 29, 10:22 pm, "Wu, Yue" <vano...@...> wrote:
            > > > Ok, 2html now has supported folding, thanks for nice work, so fantasic!
            >
            > > No doubt you're referring to the patch in this thread:
            >
            > >http://groups.google.com/group/vim_dev/browse_thread/thread/84bcdc1a7...
            >
            > [snip]
            >
            > I have used it some time too from when you posted a full version here :)
            >
            > Still something I don't like: foldcolumn is too wide, actually I like to hide
            > them at all, and I think if I can click the header text of a level of folding
            > to fold and unfold would be more convenient for using.
            >

            In the discussions leading up to the patch, people liked the idea of
            clicking the text to toggle a fold, but we were having trouble
            figuring out what to do in the case of multiple folds opening on the
            same line. The problem exists in Vim, too; you can't access all folds
            if you have multiple folds on the same line when using "za". So, I
            went with the foldcolumn route. Knowing, however, that some may think
            the foldcolumn is ugly, I provided an option to allow the mouse to
            open folds simply by hovering over them and the ability to turn off
            the fold column.

            >
            > I don't know the web relating technology, but I think 2html can use the tag
            > file of the current document, and then make all |foo| and *foo* in the
            > document as a hypertext? Is it hard to implement?
            >

            I think the heart of the problem is the fact that 2html is designed to
            work on a single file. Hyperlinking across files would be a very
            different task. In addition, the file name when saved is left entirely
            up to the user. It would be very difficult to get this right in all
            cases. That being said, it should be possible to create an additional
            plugin that would read the tag file and do a global find and replace
            to make the hyperlinks, perhaps asking the user for an html file name
            to correspond to each real file found.
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Wu, Yue
            ... I don t think there are more cases that user need to access all folds in a time than open folds one level by one level. So it s not a problem from my view.
            Message 5 of 9 , May 1, 2009
            • 0 Attachment
              On Fri, May 01, 2009 at 06:45:55AM -0700, Ben Fritz wrote:
              >
              > >
              > > I have used it some time too from when you posted a full version here :)
              > >
              > > Still something I don't like: foldcolumn is too wide, actually I like to hide
              > > them at all, and I think if I can click the header text of a level of folding
              > > to fold and unfold would be more convenient for using.
              > >
              >
              > In the discussions leading up to the patch, people liked the idea of
              > clicking the text to toggle a fold, but we were having trouble
              > figuring out what to do in the case of multiple folds opening on the
              > same line. The problem exists in Vim, too; you can't access all folds
              > if you have multiple folds on the same line when using "za". So, I
              > went with the foldcolumn route. Knowing, however, that some may think
              > the foldcolumn is ugly, I provided an option to allow the mouse to
              > open folds simply by hovering over them and the ability to turn off
              > the fold column.

              I don't think there are more cases that user need to access all folds in a
              time than open folds one level by one level. So it's not a problem from my
              view.

              >
              > >
              > > I don't know the web relating technology, but I think 2html can use the tag
              > > file of the current document, and then make all |foo| and *foo* in the
              > > document as a hypertext? Is it hard to implement?
              > >
              >
              > I think the heart of the problem is the fact that 2html is designed to
              > work on a single file. Hyperlinking across files would be a very
              > different task. In addition, the file name when saved is left entirely
              > up to the user. It would be very difficult to get this right in all
              > cases. That being said, it should be possible to create an additional
              > plugin that would read the tag file and do a global find and replace
              > to make the hyperlinks, perhaps asking the user for an html file name
              > to correspond to each real file found.

              Hmm, got it, I think you can create an option 'g:2html_tagfile' then user can
              configure it and let 2html do the translation work?

              --
              Hi,
              Wu, Yue

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Tony Mechelynck
              ... [...] ... Well, in Vim help files, |this| is indeed a link, but so is that . However, where it gets complicated is that not only [range] is a link, but
              Message 6 of 9 , May 2, 2009
              • 0 Attachment
                On 01/05/09 00:11, Wu, Yue wrote:
                > On Thu, Apr 30, 2009 at 07:05:53AM -0700, Ben Fritz wrote:
                >> On Apr 29, 10:22 pm, "Wu, Yue"<vano...@...> wrote:
                [...]
                >>> new feature request comes :) If 2html supports translating the tags jumping
                >>> to hypertext, it would be much more great.
                >>>
                >>
                >> I think this would be extremely difficult to do right in Vim script,
                >> and it is hard to tell exactly how to go about it. I think it would be
                >> far beyond the scope of 2html.vim, and additionally (if I understand
                >> you correctly) this is a task that is already accomplished by many
                >> readily available tools. Just do a google search or poke around on
                >> sourceforge. "Tags jumping" is kind of open to interpretation, so I'm
                >> not sure exactly what you want, but there are tools to create html
                >> with embedded links, tree views, etc. based on all sorts of plaintext
                >> documents.
                >
                > I don't know the web relating technology, but I think 2html can use the tag
                > file of the current document, and then make all |foo| and *foo* in the
                > document as a hypertext? Is it hard to implement?
                >

                Well, in Vim help files, |this| is indeed a link, but so is 'that'.
                However, where it gets complicated is that not only [range] is a link,
                but also that you can double click (or hit Ctrl-] on) any word anywhere
                in the help text, and if there is a tag by that name (or if there isn't,
                a tag containing that name) you'll be brought to it. But if you
                linkified any word which appeared as a tag, you'd sometimes get
                preposterous results. For instance, in the HTML help
                http://vimdoc.sourceforge.net/htmldoc/ any occurrence of the pronoun
                "it" is linkified, because there is a text object named "it" (inner HTML
                tag block) and it has a tag.

                But tags are not limited to the Vim help. You can use ctags to generate
                tags files for source programs in most languages, and then you can click
                any use of any identifier anywhere in the source, and see where it was
                defined (provided of course, that the source file containing the
                definition was one of those analyzed by ctags to produce this tagfile).
                Now an identifier can be almost any word (and, if it is e.g. a
                variable-name, it doesn't particularly stand out the way function names
                do by virtue of being followed by an open bracket).


                Best regards,
                Tony.
                --
                There is a theory that states: "If anyone finds out what the universe
                is for it will disappear and be replaced by something more bazaarly
                inexplicable."

                There is another theory that states: "This has already happened ...."
                -- Douglas Adams, "Hitch-Hikers Guide to the Galaxy"

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_dev" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Wu, Yue
                ... We can make things simple: make all *foo* become *foo* , and all |foo| to |foo| *foo* = *foo* ... I
                Message 7 of 9 , May 2, 2009
                • 0 Attachment
                  On Sun, May 03, 2009 at 02:50:52AM +0200, Tony Mechelynck wrote:
                  >
                  > On 01/05/09 00:11, Wu, Yue wrote:
                  > >
                  > > I don't know the web relating technology, but I think 2html can use the tag
                  > > file of the current document, and then make all |foo| and *foo* in the
                  > > document as a hypertext? Is it hard to implement?
                  > >
                  >
                  > Well, in Vim help files, |this| is indeed a link, but so is 'that'.
                  > However, where it gets complicated is that not only [range] is a link,
                  > but also that you can double click (or hit Ctrl-] on) any word anywhere
                  > in the help text, and if there is a tag by that name (or if there isn't,
                  > a tag containing that name) you'll be brought to it. But if you
                  > linkified any word which appeared as a tag, you'd sometimes get
                  > preposterous results. For instance, in the HTML help
                  > http://vimdoc.sourceforge.net/htmldoc/ any occurrence of the pronoun
                  > "it" is linkified, because there is a text object named "it" (inner HTML
                  > tag block) and it has a tag.
                  >

                  We can make things simple: make all *foo* become <target=foo>*foo*</taget>,
                  and all |foo| to <ref=foo>|foo|</ref>

                  *foo* => <target=foo>*foo*</taget>

                  |foo| => <ref=foo>|foo|</ref>

                  I don't know html, it's my wrongly syntax example :)

                  Though maybe fully hyperlink support is complicated, but we can support some
                  simple cases firstly.

                  --
                  Hi,
                  Wu, Yue

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_dev" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Tony Mechelynck
                  ... If you don t know HTML, then the correct syntax would be *foo* |foo| foo if they are
                  Message 8 of 9 , May 6, 2009
                  • 0 Attachment
                    On 03/05/09 08:24, Wu, Yue wrote:
                    >
                    > On Sun, May 03, 2009 at 02:50:52AM +0200, Tony Mechelynck wrote:
                    >>
                    >> On 01/05/09 00:11, Wu, Yue wrote:
                    >>>
                    >>> I don't know the web relating technology, but I think 2html can use the tag
                    >>> file of the current document, and then make all |foo| and *foo* in the
                    >>> document as a hypertext? Is it hard to implement?
                    >>>
                    >>
                    >> Well, in Vim help files, |this| is indeed a link, but so is 'that'.
                    >> However, where it gets complicated is that not only [range] is a link,
                    >> but also that you can double click (or hit Ctrl-] on) any word anywhere
                    >> in the help text, and if there is a tag by that name (or if there isn't,
                    >> a tag containing that name) you'll be brought to it. But if you
                    >> linkified any word which appeared as a tag, you'd sometimes get
                    >> preposterous results. For instance, in the HTML help
                    >> http://vimdoc.sourceforge.net/htmldoc/ any occurrence of the pronoun
                    >> "it" is linkified, because there is a text object named "it" (inner HTML
                    >> tag block) and it has a tag.
                    >>
                    >
                    > We can make things simple: make all *foo* become<target=foo>*foo*</taget>,
                    > and all |foo| to<ref=foo>|foo|</ref>
                    >
                    > *foo* => <target=foo>*foo*</taget>
                    >
                    > |foo| => <ref=foo>|foo|</ref>
                    >
                    > I don't know html, it's my wrongly syntax example :)
                    >
                    > Though maybe fully hyperlink support is complicated, but we can support some
                    > simple cases firstly.
                    >

                    If you don't know HTML, then the correct syntax would be

                    <a name="foo" id="foo">*foo*</a>
                    <a href="#foo">|foo|</a>
                    <a href="#'foo'">'foo'</a>

                    if they are in the same file, though I think those link names (value of
                    the name= id= href= attributes) cannot contain almost any characters the
                    way Vim help tags do. In particular they can certainly not contain a #
                    character since it separates the URL from the label in the href attribute.

                    For a target in a different file, it would be

                    <a href="bar.txt#foo">|foo|</a>

                    etc., using a "relative URL", relative to the directory of the file
                    where the href link is found.


                    Best regards,
                    Tony.
                    --
                    Violence is the last refuge of the incompetent.
                    -- Salvor Hardin

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_dev" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Peter Odding
                    Hi all. Sorry to resurrect an old thread, however: ... I wrote a plug-in that does this. It s far from perfect and as usual I haven t tested it enough, but
                    Message 9 of 9 , Jun 4, 2010
                    • 0 Attachment
                      Hi all. Sorry to resurrect an old thread, however:

                      Wu, Yue wrote:
                      > Ok, 2html now has supported folding, thanks for nice work, so fantasic! Now,
                      > new feature request comes :) If 2html supports translating the tags jumping
                      > to hypertext, it would be much more great.

                      I wrote a plug-in that does this. It's far from perfect and as usual I
                      haven't tested it enough, but it's also a whole lot better than nothing
                      :-). I've used the plug-in to publish itself so you can have a look at
                      the result:

                      * http://peterodding.com/code/vim/profile/plugin/publish.vim

                      I've uploaded a ZIP archive with the plug-in to www.vim.org but if
                      you're interested the README is a bit more readable on my homepage:

                      * http://www.vim.org/scripts/script.php?script_id=2252
                      * http://peterodding.com/code/vim/publish/

                      I hope this somewhat resembles what you had in mind. Have fun! :-)

                      - Peter Odding

                      --
                      You received this message from the "vim_dev" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php
                    Your message has been successfully submitted and would be delivered to recipients shortly.