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

errorformat when error is not a number

Expand Messages
  • FlashBurn
    I have setup my errorformat quite nicely to match the compiler and lint output, however today I bumped onto a new error format: ^
    Message 1 of 4 , Apr 3 3:25 PM
    View Source
    • 0 Attachment
      I have setup my errorformat quite nicely to match the compiler and lint output, however today I bumped onto a new error format:

      <offending expression>
      ^
      "path/to/the/file",<line number><white space>Error[Pe<error number>]:<white space><error message>v

      Vim usually displays error number next to the error, but for the error number it matches exactly that - a number. Does anybody know if there is a way to make it match also a string for error number, i.e. Pe[<error number>] so that vim could display it like

      <path to the file|<line number> col <column number> error Pe<error number>| error message

      I know how to set it up if there is no Pe in the error number, but I would like to be able to stick "Pe" between the two pipes (vertical lines).

      Any help is appreciated.

      --
      --
      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Ben Fritz
      ... Can you give an example of an error you are trying to match? Your example isn t very clear to me. It seems like you re saying you want to match lines like:
      Message 2 of 4 , Apr 4 8:13 AM
      View Source
      • 0 Attachment
        On Wednesday, April 3, 2013 5:25:04 PM UTC-5, FlashBurn wrote:
        > I have setup my errorformat quite nicely to match the compiler and lint output, however today I bumped onto a new error format:
        >
        > <offending expression>
        > ^
        > "path/to/the/file",<line number><white space>Error[Pe<error number>]:<white space><error message>v
        >
        > Vim usually displays error number next to the error, but for the error number it matches exactly that - a number. Does anybody know if there is a way to make it match also a string for error number, i.e. Pe[<error number>] so that vim could display it like
        >
        > <path to the file|<line number> col <column number> error Pe<error number>| error message
        >
        > I know how to set it up if there is no Pe in the error number, but I would like to be able to stick "Pe" between the two pipes (vertical lines).
        >
        > Any help is appreciated.

        Can you give an example of an error you are trying to match? Your example isn't very clear to me. It seems like you're saying you want to match lines like:

        /a/b/c/myfile.c,1234 Error[Pe12345]: something that has a trailing v

        And have Vim display:

        /a/b/c/myfile.c|1234 error Pe12345| something that has a trailing

        But you can only get it to display:

        /a/b/c/myfile.c|1234 error 12345| something that has a trailing

        Is this correct? If so, I do not think Vim can display the "Pe" within the |...| information. Is there a reason it is important? You could just match it as part of the message instead. I don't know if there is a better way to display it.

        --
        --
        You received this message from the "vim_use" 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_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • FlashBurn
        ... Oops, trailing v was not supposed to be there, but otherwise you were correct in what i was trying to do. There is no particular reason for displaying Pe
        Message 3 of 4 , Apr 4 9:12 AM
        View Source
        • 0 Attachment
          On Thursday, April 4, 2013 11:13:21 AM UTC-4, Ben Fritz wrote:
          > On Wednesday, April 3, 2013 5:25:04 PM UTC-5, FlashBurn wrote:
          > > I have setup my errorformat quite nicely to match the compiler and lint output, however today I bumped onto a new error format:
          > >
          > > <offending expression>
          > > ^
          > > "path/to/the/file",<line number><white space>Error[Pe<error number>]:<white space><error message>v
          > >
          > > Vim usually displays error number next to the error, but for the error number it matches exactly that - a number. Does anybody know if there is a way to make it match also a string for error number, i.e. Pe[<error number>] so that vim could display it like
          > >
          > > <path to the file|<line number> col <column number> error Pe<error number>| error message
          > >
          > > I know how to set it up if there is no Pe in the error number, but I would like to be able to stick "Pe" between the two pipes (vertical lines).
          > >
          > > Any help is appreciated.
          >
          > Can you give an example of an error you are trying to match? Your example isn't very clear to me. It seems like you're saying you want to match lines like:
          >
          > /a/b/c/myfile.c,1234 Error[Pe12345]: something that has a trailing v
          >
          > And have Vim display:
          >
          > /a/b/c/myfile.c|1234 error Pe12345| something that has a trailing
          >
          > But you can only get it to display:
          >
          > /a/b/c/myfile.c|1234 error 12345| something that has a trailing
          >
          > Is this correct? If so, I do not think Vim can display the "Pe" within the |...| information. Is there a reason it is important? You could just match it as part of the message instead. I don't know if there is a better way to display it.

          Oops, trailing v was not supposed to be there, but otherwise you were correct in what i was trying to do. There is no particular reason for displaying Pe inside the |...| I wanted to know if it was possible, and if it is why not to do it. Also I was able to match part of the error message.

          Thanks for the help.

          --
          --
          You received this message from the "vim_use" 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_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Ben Fritz
          ... I just re-read your message, and I think I missed addressing something. The ^ line can be used to match a column with multi-line messages,
          Message 4 of 4 , Apr 4 9:39 AM
          View Source
          • 0 Attachment
            On Wednesday, April 3, 2013 5:25:04 PM UTC-5, FlashBurn wrote:
            > I have setup my errorformat quite nicely to match the compiler and lint output, however today I bumped onto a new error format:
            >
            > <offending expression>
            > ^
            > "path/to/the/file",<line number><white space>Error[Pe<error number>]:<white space><error message>v
            >

            I just re-read your message, and I think I missed addressing something.

            The " ^" line can be used to match a column with multi-line messages, using the %p item. I'm not sure whether you had figured that out or not.

            --
            --
            You received this message from the "vim_use" 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_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+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.