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

[patch] Add spelling infos to 2html

Expand Messages
  • Christian Brabandt
    Hello Ben, Bram and list, ... here is a patch, that makes 2html aware of the syntax highlighting for SpellBad, SpellRare, SpellLocal and SpellCaps It does this
    Message 1 of 4 , Sep 24, 2011
    • 0 Attachment
      Hello Ben, Bram and list,
      :TOhtml does not take the spell checking info into account. Therefore,
      here is a patch, that makes 2html aware of the syntax highlighting for
      SpellBad, SpellRare, SpellLocal and SpellCaps

      It does this by using a simple gif file and using a css property of
      'background: url(file), bottom repeat-x' For ease of use, it uses the
      gif file base64 encoded inside the html file, so no separate image file
      is needed in addition to the generated html file. The only problem is,
      the colors are fixed to the ones, vim uses with the default color scheme
      (e.g. red curly line for SpellBad, blue curly line for SpellCap, magenta
      colored for SpellRare and cyan colored for SpellLocal).

      All words that need to be highlighted using one of the Spelling
      highlighting will get a <span id=SpellBad> tag around it.

      The gif file was take away from the tinymceš project (which is LGPL
      licensed) and color converted to all needed colors by me and finally
      base64 encoded.


      regards,
      Christian

      š)http://www.tinymce.com/
      --
      Der Fehler schwacher Geister ist, dass sie im Reflektieren
      sogleich vom Einzelnen ins Allgemeine gehen, anstatt dass man nur in
      der Gesamtheit das Allgemeine suchen kann.
      -- Goethe, Maximen und Reflektionen, Nr. 1046

      --
      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
    • Bram Moolenaar
      ... I appreciate the effort that you made this work. But I doubt users will want to see their spelling mistakes in the produced HTML file. At least the
      Message 2 of 4 , Sep 25, 2011
      • 0 Attachment
        Christian Brabandt wrote:

        > Hello Ben, Bram and list,
        > :TOhtml does not take the spell checking info into account. Therefore,
        > here is a patch, that makes 2html aware of the syntax highlighting for
        > SpellBad, SpellRare, SpellLocal and SpellCaps
        >
        > It does this by using a simple gif file and using a css property of
        > 'background: url(file), bottom repeat-x' For ease of use, it uses the
        > gif file base64 encoded inside the html file, so no separate image file
        > is needed in addition to the generated html file. The only problem is,
        > the colors are fixed to the ones, vim uses with the default color scheme
        > (e.g. red curly line for SpellBad, blue curly line for SpellCap, magenta
        > colored for SpellRare and cyan colored for SpellLocal).
        >
        > All words that need to be highlighted using one of the Spelling
        > highlighting will get a <span id=SpellBad> tag around it.
        >
        > The gif file was take away from the tinymce¹ project (which is LGPL
        > licensed) and color converted to all needed colors by me and finally
        > base64 encoded.

        I appreciate the effort that you made this work. But I doubt users will
        want to see their spelling mistakes in the produced HTML file.

        At least the default should be off. And a remark in the docs about how
        to use it.

        --
        How To Keep A Healthy Level Of Insanity:
        12. Sing along at the opera.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        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
      • Ben Fritz
        ... (encoding screwup from google groups interface again, ugh) Thanks, I ll take a look. I was trying to figure out a good way to incorporate the guisp
        Message 3 of 4 , Sep 25, 2011
        • 0 Attachment
          On Sep 24, 3:28 pm, Christian Brabandt <cbli...@...> wrote:
          > Hello Ben, Bram and list,
          > :TOhtml does not take the spell checking info into account. Therefore,
          > here is a patch, that makes 2html aware of the syntax highlighting for
          > SpellBad, SpellRare, SpellLocal and SpellCaps
          >
          > It does this by using a simple gif file and using a css property of
          > 'background: url(file), bottom repeat-x' For ease of use, it uses the
          > gif file base64 encoded inside the html file, so no separate image file
          > is needed in addition to the generated html file. The only problem is,
          > the colors are fixed to the ones, vim uses with the default color scheme
          > (e.g. red curly line for SpellBad, blue curly line for SpellCap, magenta
          > colored for SpellRare and cyan colored for SpellLocal).
          >
          > All words that need to be highlighted using one of the Spelling
          > highlighting will get a <span id=SpellBad> tag around it.
          >
          > The gif file was take away from the tinymce� project (which is LGPL
          > licensed) and color converted to all needed colors by me and finally
          > base64 encoded.
          >
          > regards,
          > Christian
          >
          > �)http://www.tinymce.com/

          (encoding screwup from google groups interface again, ugh)

          Thanks, I'll take a look. I was trying to figure out a good way to
          incorporate the guisp highlight (turned off by default).

          But, I'm not very fond of the idea of including base64-encoded stuff
          into the output. Primarily at the moment that's because I don't really
          fully grasp what that means (just through not attempting to learn
          about it yet). Eventually I may revisit that, especially since Zyx's
          plugin does this for images in the signs column IIUC.

          I agree with Bram though that mostly the reason to use TOhtml is
          (probably) to share the output with others, and for this use spelling
          mistakes and the like are normally distracting at best.

          --
          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
        • Gašper Ažman
          ... Even though I m a complete nobody as far as vim development is concerned (except a faithful user) I would welcome this feature (with an on/off switch, of
          Message 4 of 4 , Sep 25, 2011
          • 0 Attachment
            On Mon, Sep 26, 2011 at 05:20, Ben Fritz <fritzophrenic@...> wrote:
            >
            >
            > On Sep 24, 3:28 pm, Christian Brabandt <cbli...@...> wrote:
            >> Hello Ben, Bram and list,
            >> :TOhtml does not take the spell checking info into account. Therefore,
            >> here is a patch, that makes 2html aware of the syntax highlighting for
            >> SpellBad, SpellRare, SpellLocal and SpellCaps
            >>
            >> It does this by using a simple gif file and using a css property of
            >> 'background: url(file), bottom repeat-x' For ease of use, it uses the
            >> gif file base64 encoded inside the html file, so no separate image file
            >> is needed in addition to the generated html file. The only problem is,
            >> the colors are fixed to the ones, vim uses with the default color scheme
            >> (e.g. red curly line for SpellBad, blue curly line for SpellCap, magenta
            >> colored for SpellRare and cyan colored for SpellLocal).
            >>
            >> All words that need to be highlighted using one of the Spelling
            >> highlighting will get a <span id=SpellBad> tag around it.
            >>
            >> The gif file was take away from the tinymce� project (which is LGPL
            >> licensed) and color converted to all needed colors by me and finally
            >> base64 encoded.
            >>
            >> regards,
            >> Christian
            >>
            >> �)http://www.tinymce.com/
            >
            > (encoding screwup from google groups interface again, ugh)
            >
            > Thanks, I'll take a look. I was trying to figure out a good way to
            > incorporate the guisp highlight (turned off by default).
            >
            > But, I'm not very fond of the idea of including base64-encoded stuff
            > into the output. Primarily at the moment that's because I don't really
            > fully grasp what that means (just through not attempting to learn
            > about it yet). Eventually I may revisit that, especially since Zyx's
            > plugin does this for images in the signs column IIUC.
            >
            > I agree with Bram though that mostly the reason to use TOhtml is
            > (probably) to share the output with others, and for this use spelling
            > mistakes and the like are normally distracting at best.
            >
            > --
            > 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
            >


            Even though I'm a complete nobody as far as vim development is
            concerned (except a faithful user) I would welcome this feature (with
            an on/off switch, of course). Default off seems fine to me, but I'd
            still like it.

            Oh, and the base64 encoding is just fine - that's the only way you can
            directly include images in html and it's supported in all newer
            browsers.

            My 2c.

            Thanks,

            Gašper



            --
            Atoms are watching...

            --
            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.