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

patch ocaml move errorformat to compiler file (opt-in)

Expand Messages
  • Marc Weber
    There are two reaons: 1) efm should not be set in ftplugin 2) the error foramt itself is annoying in some cases (see comments) Additional question: Should it
    Message 1 of 6 , Jun 28, 2013
    • 0 Attachment
      There are two reaons:
      1) efm should not be set in ftplugin
      2) the error foramt itself is annoying in some cases (see comments)


      Additional question:

      Should it be Vim enforcing textwidth?

      indent/ocaml.vim contains:
      setlocal textwidth=80

      For some projects this is annoying.

      Marc Weber

      --
      --
      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.
    • Marc Weber
      ... So this code is annoying two people (you and me). So the patch should be extended to also not set textwidth ? The right way to go is having project
      Message 2 of 6 , Jun 28, 2013
      • 0 Attachment
        > I couldn't care less about the textwidth setting, which I always set
        > to 0 for my code (I prefer manual wrapping if needed).
        So this code is annoying two people (you and me).
        So the patch should be extended to also not set textwidth ?

        The right way to go is having project specific setups, eg
        github.com/MarcWeber/vim-addon-local-vimrc
        or per file settings (modeline).

        > Maybe somebody with better knowledge of Vim-conventions can weigh in
        > on where to move "efm".
        $VIMRUNTIME/compiler/ocaml.vim (see patch)

        You activate such a compiler by :compiler ocaml
        then.

        However you can also try github.com/MarcWeber/vim-addon-actions which
        allows you to map a compilation action to a key. Before the compilation
        action is run error format is always set.

        Eg currently I use rake to compile an ocaml project. So I may have ruby
        or ocaml errors in the output. vim-addon-errorformats allows me to do:

        :Errorformat ocaml_simple ruby

        For those reasons I think the :compiler system of Vim is nice, but fails
        for some use cases, too.

        I'd like to split vimruntime, put it on github, and have people
        contribute to it. Things would improve very fast then.
        But that's another story.

        Marc Weber

        --
        --
        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.
      • Bram Moolenaar
        ... Settings in ftplugin and compiler plugins should be what nearly all users will want. It should not be a personal preference. E.g., if Cobol or Fortran
        Message 3 of 6 , Jun 29, 2013
        • 0 Attachment
          Marc Weber wrote:

          > > I couldn't care less about the textwidth setting, which I always set
          > > to 0 for my code (I prefer manual wrapping if needed).
          > So this code is annoying two people (you and me).
          > So the patch should be extended to also not set textwidth ?
          >
          > The right way to go is having project specific setups, eg
          > github.com/MarcWeber/vim-addon-local-vimrc
          > or per file settings (modeline).
          >
          > > Maybe somebody with better knowledge of Vim-conventions can weigh in
          > > on where to move "efm".
          > $VIMRUNTIME/compiler/ocaml.vim (see patch)
          >
          > You activate such a compiler by :compiler ocaml
          > then.
          >
          > However you can also try github.com/MarcWeber/vim-addon-actions which
          > allows you to map a compilation action to a key. Before the compilation
          > action is run error format is always set.
          >
          > Eg currently I use rake to compile an ocaml project. So I may have ruby
          > or ocaml errors in the output. vim-addon-errorformats allows me to do:
          >
          > :Errorformat ocaml_simple ruby
          >
          > For those reasons I think the :compiler system of Vim is nice, but fails
          > for some use cases, too.
          >
          > I'd like to split vimruntime, put it on github, and have people
          > contribute to it. Things would improve very fast then.
          > But that's another story.

          Settings in ftplugin and compiler plugins should be what nearly all
          users will want. It should not be a personal preference.

          E.g., if Cobol or Fortran dictate that lines must be shorter than 75
          columns, then 'textwidth' can be set for those languages. For most
          other languages it's a personal preference and the value could be 80,
          100 or zero. So don't set it then.

          --
          GUARD #2: Wait a minute -- supposing two swallows carried it together?
          GUARD #1: No, they'd have to have it on a line.
          GUARD #2: Well, simple! They'd just use a standard creeper!
          GUARD #1: What, held under the dorsal guiding feathers?
          GUARD #2: Well, why not?
          The Quest for the Holy Grail (Monty Python)

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

          ---
          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.
        • Bram Moolenaar
          ... Well, if there is only one possible compiler then it doesn t really matter. ... Then it would need to be fixed. Moving it elsewhere doesn t really change
          Message 4 of 6 , Jun 29, 2013
          • 0 Attachment
            Marc Weber wrote:

            > There are two reaons:
            > 1) efm should not be set in ftplugin

            Well, if there is only one possible compiler then it doesn't really
            matter.

            > 2) the error foramt itself is annoying in some cases (see comments)

            Then it would need to be fixed. Moving it elsewhere doesn't really
            change anything, right?

            > Additional question:
            >
            > Should it be Vim enforcing textwidth?
            >
            > indent/ocaml.vim contains:
            > setlocal textwidth=80
            >
            > For some projects this is annoying.

            Note that the new compiler/ocaml.vim is missing a proper header and
            usual checks for current_compiler.



            --
            MORTICIAN: What?
            CUSTOMER: Nothing -- here's your nine pence.
            DEAD PERSON: I'm not dead!
            MORTICIAN: Here -- he says he's not dead!
            CUSTOMER: Yes, he is.
            DEAD PERSON: I'm not!
            The Quest for the Holy Grail (Monty Python)

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

            ---
            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.
          • Marc Weber
            updated patch attached Marc Weber -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying
            Message 5 of 6 , Jun 29, 2013
            • 0 Attachment
              updated patch attached

              Marc Weber

              --
              --
              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.
            • Bram Moolenaar
              ... Thanks. Also need to save and restore cpo . Compiler isn t called ant :-) I ll make those changes, no need to send another patch. -- ARTHUR: Well, I AM
              Message 6 of 6 , Jun 29, 2013
              • 0 Attachment
                Marc Weber wrote:

                > updated patch attached

                Thanks.

                Also need to save and restore 'cpo'.

                Compiler isn't called "ant" :-)

                I'll make those changes, no need to send another patch.


                --
                ARTHUR: Well, I AM king...
                DENNIS: Oh king, eh, very nice. An' how'd you get that, eh? By exploitin'
                the workers -- by 'angin' on to outdated imperialist dogma which
                perpetuates the economic an' social differences in our society! If
                there's ever going to be any progress--
                The Quest for the Holy Grail (Monty Python)

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

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