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

HTML indent script sucks

Expand Messages
  • Andy Wokula
    People, you can fill this thread with your complaints about the HTML indent script. I m the current maintainer, lately I read lots of unspecific rants here and
    Message 1 of 10 , Aug 4, 2013
      People, you can fill this thread with your complaints about the HTML
      indent script.

      I'm the current maintainer, lately I read lots of unspecific rants here and
      there but direct feedback is rare for some reason.

      The current version is a descendant of
      http://vim.sf.net/scripts/script.php?script_id=2075
      It's very different from the original version by J. Zellner.

      I'm aware of some deficiencies, I don't mind to hear them twice.

      --
      Andy

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

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Ben Fritz
      ... How long ago did the original version get replaced with yours? Perhaps most complaints pre-date you taking over. -- -- You received this message from the
      Message 2 of 10 , Aug 4, 2013
        On Sunday, August 4, 2013 2:53:39 PM UTC-5, Andy Wokula wrote:
        >
        >
        > The current version is a descendant of
        >
        > http://vim.sf.net/scripts/script.php?script_id=2075
        >
        > It's very different from the original version by J. Zellner.
        >

        How long ago did "the original version" get replaced with yours? Perhaps most complaints pre-date you taking over.

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

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • tooth pik
        ... interestingly, what s available on vim.sourceforge.net is version 0.8, and what s being disseminated with the runtime is version 0.9 I thought what s on
        Message 3 of 10 , Aug 4, 2013
          On Sun, Aug 04, 2013 at 09:53:39PM +0200, Andy Wokula wrote:
          > People, you can fill this thread with your complaints about the HTML
          > indent script.

          > I'm the current maintainer, lately I read lots of unspecific rants here and
          > there but direct feedback is rare for some reason.

          > The current version is a descendant of

          > http://vim.sf.net/scripts/script.php?script_id=2075

          interestingly, what's available on vim.sourceforge.net is version 0.8,
          and what's being disseminated with the runtime is version 0.9

          I thought what's on sf.net was supposed to be more current, not less

          --
          _|_ _ __|_|_ ._ o|
          |_(_)(_)|_| ||_)||<
          |

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

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Tony Mechelynck
          ... Ben, about 6 hours before you posted this, and in a different thread ( Official petition etc., which is totally unofficial and a one-man petition so far)
          Message 4 of 10 , Aug 4, 2013
            On 04/08/13 22:21, Ben Fritz wrote:
            > On Sunday, August 4, 2013 2:53:39 PM UTC-5, Andy Wokula wrote:
            >>
            >>
            >> The current version is a descendant of
            >>
            >> http://vim.sf.net/scripts/script.php?script_id=2075
            >>
            >> It's very different from the original version by J. Zellner.
            >>
            >
            > How long ago did "the original version" get replaced with yours? Perhaps most complaints pre-date you taking over.
            >
            Ben, about 6 hours before you posted this, and in a different thread
            ("Official petition" etc., which is totally unofficial and a one-man
            petition so far) Bram wrote "Editing HTML is a pain. I hope someone
            fixes the indent plugin for that." Admittedly he didn't give any details.

            Me, I use ":filetype indent off" on coming back from sourcing the
            vimrc_example.vim, so even though I do quite a lot of HTML editing I
            have no opinion about the quality of its indent plugin.


            Best regards,
            Tony.
            --
            Welcome to Burger God: Have it YAHWEH!

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

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Gary Johnson
            ... Thank you for being so open to criticism and so willing to make changes. I started looking for examples of indentation that I didn t like in my HTML files.
            Message 5 of 10 , Aug 5, 2013
              On 2013-08-04, Andy Wokula wrote:
              > People, you can fill this thread with your complaints about the HTML
              > indent script.
              >
              > I'm the current maintainer, lately I read lots of unspecific rants here and
              > there but direct feedback is rare for some reason.
              >
              > The current version is a descendant of
              > http://vim.sf.net/scripts/script.php?script_id=2075
              > It's very different from the original version by J. Zellner.
              >
              > I'm aware of some deficiencies, I don't mind to hear them twice.

              Thank you for being so open to criticism and so willing to make
              changes.

              I started looking for examples of indentation that I didn't like in
              my HTML files. Then I looked in the indent/html.vim plugin and
              discovered that it had changed a lot since the last time I tried
              tuning it. I found that I could fix all the indentation issues by
              putting this in my ~/.vimrc:

              let g:html_indent_inctags = "body,html,head,p,tbody"

              With that, the indentation now looks great.

              I got frustrated with Vim's HTML indentation some time ago and just
              stopped relying on it. It may be that I haven't given it a chance
              since your plugin was adopted.

              Regards,
              Gary

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

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Andy Wokula
              ... Ok. If it works, this means you are always putting the closing tag. But the end tag for BODY, HTML, P, TBODY (and a few others) is optional. I want to add
              Message 6 of 10 , Aug 5, 2013
                Am 05.08.2013 09:01, schrieb Gary Johnson:
                > On 2013-08-04, Andy Wokula wrote:
                >> People, you can fill this thread with your complaints about the HTML
                >> indent script.
                >>
                >> I'm the current maintainer, lately I read lots of unspecific rants
                >> here and there but direct feedback is rare for some reason.
                >>
                >> The current version is a descendant of
                >> http://vim.sf.net/scripts/script.php?script_id=2075
                >> It's very different from the original version by J. Zellner.
                >>
                >> I'm aware of some deficiencies, I don't mind to hear them twice.
                >
                > Thank you for being so open to criticism and so willing to make
                > changes.
                >
                > I started looking for examples of indentation that I didn't like in
                > my HTML files. Then I looked in the indent/html.vim plugin and
                > discovered that it had changed a lot since the last time I tried
                > tuning it. I found that I could fix all the indentation issues by
                > putting this in my ~/.vimrc:
                >
                > let g:html_indent_inctags = "body,html,head,p,tbody"
                >
                > With that, the indentation now looks great.

                Ok. If it works, this means you are always putting the closing tag.
                But the end tag for BODY, HTML, P, TBODY (and a few others) is optional.
                I want to add support for missing closing tags, but I wonder if it's
                worth the effort.

                And yes, you can tell for each tag element if it should cause extra
                indent or not.

                > I got frustrated with Vim's HTML indentation some time ago and just
                > stopped relying on it. It may be that I haven't given it a chance
                > since your plugin was adopted.

                --
                Andy

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

                ---
                You received this message because you are subscribed to the Google Groups "vim_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • Andy Wokula
                ... The new script is included since June 12 2013. -- Andy -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below
                Message 7 of 10 , Aug 5, 2013
                  Am 04.08.2013 22:21, schrieb Ben Fritz:
                  > On Sunday, August 4, 2013 2:53:39 PM UTC-5, Andy Wokula wrote:
                  >>
                  >> The current version is a descendant of
                  >>
                  >> http://vim.sf.net/scripts/script.php?script_id=2075
                  >>
                  >> It's very different from the original version by J. Zellner.
                  >
                  > How long ago did "the original version" get replaced with yours?
                  > Perhaps most complaints pre-date you taking over.

                  The new script is included since June 12 2013.

                  --
                  Andy

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

                  ---
                  You received this message because you are subscribed to the Google Groups "vim_dev" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • Gary Johnson
                  ... I always use the end tag for BODY, HTML and TBODY, but I only sometimes use the end tag for P. That did cause an indentation problem for some of my
                  Message 8 of 10 , Aug 5, 2013
                    On 2013-08-05, Andy Wokula wrote:
                    > Am 05.08.2013 09:01, schrieb Gary Johnson:

                    > >I started looking for examples of indentation that I didn't like in
                    > >my HTML files. Then I looked in the indent/html.vim plugin and
                    > >discovered that it had changed a lot since the last time I tried
                    > >tuning it. I found that I could fix all the indentation issues by
                    > >putting this in my ~/.vimrc:
                    > >
                    > > let g:html_indent_inctags = "body,html,head,p,tbody"
                    > >
                    > >With that, the indentation now looks great.
                    >
                    > Ok. If it works, this means you are always putting the closing tag.
                    > But the end tag for BODY, HTML, P, TBODY (and a few others) is optional.
                    > I want to add support for missing closing tags, but I wonder if it's
                    > worth the effort.

                    I always use the end tag for BODY, HTML and TBODY, but I only
                    sometimes use the end tag for P. That did cause an indentation
                    problem for some of my paragraphs when using your plugin, but I
                    decided that now, some years after writing those files, I prefer
                    using the end tag for P as well. It's not that much effort and it
                    just looks cleaner.

                    I did look in your plugin for a way to make the </P> tag optional.
                    I suppose that would be nice, but it's no longer an issue for me.

                    Regards,
                    Gary

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

                    ---
                    You received this message because you are subscribed to the Google Groups "vim_dev" group.
                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                    For more options, visit https://groups.google.com/groups/opt_out.
                  • Ingo Karkat
                    ... First of all: Thank you for continuing the maintenance of this important filetype. I ve quickly tried it, and at least it s not worse than the previous one
                    Message 9 of 10 , Aug 7, 2013
                      On 04-Aug-2013 21:53 +0200, Andy Wokula wrote:

                      > People, you can fill this thread with your complaints about the HTML
                      > indent script.
                      >
                      > I'm the current maintainer, lately I read lots of unspecific rants here and
                      > there but direct feedback is rare for some reason.

                      First of all: Thank you for continuing the maintenance of this important
                      filetype. I've quickly tried it, and at least it's not worse than the
                      previous one ;-)

                      > The current version is a descendant of
                      > http://vim.sf.net/scripts/script.php?script_id=2075
                      > It's very different from the original version by J. Zellner.
                      >
                      > I'm aware of some deficiencies, I don't mind to hear them twice.

                      My first complaint is not directed against you:

                      > The new script is included since June 12 2013.

                      Because Bram doesn't send out runtime updates as patches, nor are the
                      changes appropriately reflected in the Mercurial commit messages, this
                      makes it hard to follow. Especially unfortunate in this case because of
                      the interface change (i.e. what used to be g:html_indent_tags is now
                      g:html_indent_inctags with different value syntax). IMO changes like
                      this should be announced more prominently, at least by a separate commit
                      with a good summary message.


                      But to your new indent plugin:

                      1. As there are many dialects / extensions of HTML (e.g. the various
                      templating languages like JSP, GSP), the script is probably used for
                      other filetypes, too, with a changed set of tags. The current global
                      variables make it cumbersome to re-use the script: Save current global
                      vars, adapt it, runtime! indent/html.vim, restore global vars.

                      2. I had used the old script for Groovy Server Pages and configured
                      indenting for all various Groovy tags matching g:\S\+; unfortunately,
                      your script only supports literal tag names so far (enumerating all the
                      different tag libraries is close to impossible, but they all have the g:
                      prefix). Fortunately, your script uses \w\+ (which is too simple, see
                      the HTML standard, but I'd prefer you'd adhere to the XML standard,
                      including namespaces) to extract the tag names, so I can right now get
                      away with just defining a "g" tag.

                      3. Likewise, there are many self-closing <g:foo/> tags. I know it's not
                      part of HTML syntax, but your script probably should ignore (i.e. not
                      indent) those.

                      4. In HTML, I like to return to column 1 after a <pre>. This is trivial
                      to patch:

                      #v+
                      @@ -350,7 +350,7 @@ func! s:FreshState(lnum) "{{{

                      func! s:Alien2() "{{{
                      " <pre> block
                      - return -1
                      + return 0
                      endfunc "}}}
                      func! s:Alien3() "{{{
                      " <script> javascript
                      #v-
                      but I'd love to have this configurable.


                      Thanks for being so open to feedback and willing to improve on this
                      crucial piece of infrastructure!

                      -- regards, ingo

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

                      ---
                      You received this message because you are subscribed to the Google Groups "vim_dev" group.
                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                      For more options, visit https://groups.google.com/groups/opt_out.
                    • Will Gray (graywh)
                      The new HTML indent script breaks Eruby indenting. https://github.com/vim-ruby/vim-ruby/issues/170 -- -- You received this message from the vim_dev maillist.
                      Message 10 of 10 , Sep 4, 2013
                        The new HTML indent script breaks Eruby indenting.

                        https://github.com/vim-ruby/vim-ruby/issues/170

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

                        ---
                        You received this message because you are subscribed to the Google Groups "vim_dev" group.
                        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                        For more options, visit https://groups.google.com/groups/opt_out.
                      Your message has been successfully submitted and would be delivered to recipients shortly.