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

Re: More request for 2html :)

Expand Messages
  • Wu, Yue
    ... We can make things simple: make all *foo* become *foo* , and all |foo| to |foo| *foo* = *foo* ... I
    Message 1 of 9 , May 2 11:24 PM
    • 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 2 of 9 , May 6 2:07 AM
      • 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 3 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.