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

Re: HTML indent script sucks

Expand Messages
  • 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 1 of 10 , Aug 5, 2013
    • 0 Attachment
      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 2 of 10 , Aug 5, 2013
      • 0 Attachment
        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 3 of 10 , Aug 5, 2013
        • 0 Attachment
          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 4 of 10 , Aug 7, 2013
          • 0 Attachment
            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 5 of 10 , Sep 4, 2013
            • 0 Attachment
              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.