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

What to do with heredoc in dosini tip?

Expand Messages
  • Ben Fritz
    We have a tip, created in July, which we are just getting around to deciding what to do with: http://vim.wikia.com/wiki/Syntax_heredoc_highlighting_for_dosini
    Message 1 of 4 , Feb 1, 2009
    • 0 Attachment
      We have a tip, created in July, which we are just getting around to
      deciding what to do with:

      http://vim.wikia.com/wiki/Syntax_heredoc_highlighting_for_dosini

      As I said in the discussion when the tip was first submitted, "if
      dosini (whatever it is) actually does support heredoc, this should be
      submitted on vim_dev and to the syntax maintainer as a patch, rather
      than as a tip here."

      If I understand correctly, "dosini" refers to DOS-style init files,
      with the ".ini" extension.

      I know pretty much nothing else about this syntax.

      So, does dosini support heredoc-style assignments? The tip seems to
      imply that *many* but not *all* programs that use .ini files can
      support, so perhaps it would be better as a tip than an official part
      of the syntax file. But I'd like to get input from those that know
      more about this before proceeding.
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Matt Wozniski
      ... Right... it s not exactly the most standardized format out there. Some parsers support quoted RHS, others don t. It wouldn t shock me if some support
      Message 2 of 4 , Feb 1, 2009
      • 0 Attachment
        On Sun, Feb 1, 2009 at 3:20 PM, Ben Fritz wrote:
        >
        > We have a tip, created in July, which we are just getting around to
        > deciding what to do with:
        >
        > http://vim.wikia.com/wiki/Syntax_heredoc_highlighting_for_dosini
        >
        > As I said in the discussion when the tip was first submitted, "if
        > dosini (whatever it is) actually does support heredoc, this should be
        > submitted on vim_dev and to the syntax maintainer as a patch, rather
        > than as a tip here."
        >
        > If I understand correctly, "dosini" refers to DOS-style init files,
        > with the ".ini" extension.
        >
        > I know pretty much nothing else about this syntax.

        Right... it's not exactly the most standardized format out there.
        Some parsers support quoted RHS, others don't. It wouldn't shock me
        if some support heredocs, but for the ones that do, is "dosini" really
        the best filetype name? DOS doesn't support heredocs AFAIR, and .ini
        is used on other systems than DOS as an easily-parseable format...
        Maybe "dosini.vim" should be moved to "ini.vim", since it is used on
        non-dos systems? Is there any precedent for renaming a filetype?

        > So, does dosini support heredoc-style assignments? The tip seems to
        > imply that *many* but not *all* programs that use .ini files can
        > support, so perhaps it would be better as a tip than an official part
        > of the syntax file. But I'd like to get input from those that know
        > more about this before proceeding.

        Well... how much harm is there in including it even if it isn't
        supported? It would only affect people who assign a variable a value
        matching /<<\(\I\i*\)/ - wouldn't it be safe to assume that no one
        would do that unless they knew the file would be parsed by something
        supporting heredocs?

        ~Matt

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Ben Schmidt
        ... I agree. It s a mess. ... My memory matches yours regarding DOS, etc. I don t know of a precedent, for a name change but I think such a change would make
        Message 3 of 4 , Feb 1, 2009
        • 0 Attachment
          >> http://vim.wikia.com/wiki/Syntax_heredoc_highlighting_for_dosini
          >>
          > Right... it's not exactly the most standardized format out there.

          I agree. It's a mess.

          > Some parsers support quoted RHS, others don't. It wouldn't shock me
          > if some support heredocs, but for the ones that do, is "dosini" really
          > the best filetype name? DOS doesn't support heredocs AFAIR, and .ini
          > is used on other systems than DOS as an easily-parseable format...
          > Maybe "dosini.vim" should be moved to "ini.vim", since it is used on
          > non-dos systems? Is there any precedent for renaming a filetype?

          My memory matches yours regarding DOS, etc. I don't know of a precedent,
          for a name change but I think such a change would make sense in this
          case. It probably shouldn't have, but the .ini format has spread like a
          virus to all kinds of areas.

          > Well... how much harm is there in including it even if it isn't
          > supported? It would only affect people who assign a variable a value
          > matching /<<\(\I\i*\)/ - wouldn't it be safe to assume that no one
          > would do that unless they knew the file would be parsed by something
          > supporting heredocs?

          I think so.

          Ben.




          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Tony Mechelynck
          ... What about backwards compatibility? With, for instance, users having ~/.vim/after/ftplugin/dosini.vim (and/or syntax/dosini.vim, indent/dosini.vim) or
          Message 4 of 4 , Feb 1, 2009
          • 0 Attachment
            On 02/02/09 02:55, Ben Schmidt wrote:
            >>> http://vim.wikia.com/wiki/Syntax_heredoc_highlighting_for_dosini
            >>>
            >> Right... it's not exactly the most standardized format out there.
            >
            > I agree. It's a mess.
            >
            >> Some parsers support quoted RHS, others don't. It wouldn't shock me
            >> if some support heredocs, but for the ones that do, is "dosini" really
            >> the best filetype name? DOS doesn't support heredocs AFAIR, and .ini
            >> is used on other systems than DOS as an easily-parseable format...
            >> Maybe "dosini.vim" should be moved to "ini.vim", since it is used on
            >> non-dos systems? Is there any precedent for renaming a filetype?
            >
            > My memory matches yours regarding DOS, etc. I don't know of a precedent,
            > for a name change but I think such a change would make sense in this
            > case. It probably shouldn't have, but the .ini format has spread like a
            > virus to all kinds of areas.

            What about backwards compatibility? With, for instance, users having
            ~/.vim/after/ftplugin/dosini.vim (and/or syntax/dosini.vim,
            indent/dosini.vim) or files with other extensions having ft=dosini in a
            Vim modeline?

            Or else, keep the existing dosini.vim scripts and define a new "ini"
            filetype with different scripts, the detection (and identification of
            which is which) being done maybe automatically (by inspecting the file's
            contents) or maybe manually (by a global variable -- undefined would
            mean keep the current behaviour)?

            The new scripts could even source the old ones (and extend them) the way
            cpp.vim does with c.vim

            >
            >> Well... how much harm is there in including it even if it isn't
            >> supported? It would only affect people who assign a variable a value
            >> matching /<<\(\I\i*\)/ - wouldn't it be safe to assume that no one
            >> would do that unless they knew the file would be parsed by something
            >> supporting heredocs?
            >
            > I think so.
            >
            > Ben.

            or those who include that kind of text in a comment?

            Best regards,
            Tony.
            --
            The streets are safe in Philadelphia, it's only the people who make
            them unsafe.
            -- Mayor Frank Rizzo

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.