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

Need help with 'errorformat'

Expand Messages
  • Tinou
    Hello, I m using gvim with the visual studio plugin that can retreive (among other things) the compilation output into the quickfix window. My errorformat is:
    Message 1 of 4 , Sep 30 6:13 AM
      Hello,

      I'm using gvim with the visual studio plugin that can retreive (among
      other things) the compilation output into the quickfix window.

      My errorformat is:

      let &errorformat='%f(%l) : %t%*\D%n: %m,%*[^"]"%f"%*\D%l: %m,%f(%l) :
      %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m'

      I don't quite understand it completely, but it matches lines such as:

      some\relative\path\file.cpp|42|error...

      My question is, how can I make it understand, also, lines such as:

      2>d:\absolute\path\file.cpp|42|error...

      For now it just opens the file "2>d:\absolute\path\file.cpp", which does
      not (and cannot) exist. I believe the "2" (which can be any number) is a
      compilation counter (per lib compiled).

      Thanks in advance,


      --
      Étienne

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Mikalai Chaly
      ... This output looks similar to that the build.exe DDK utility produces, as far as I remember, you can turn this numbering off there. Try to add
      Message 2 of 4 , Sep 30 7:21 AM
        On Wed, Sep 30, 2009 at 4:13 PM, Tinou <tinoucas@...> wrote:

        Hello,

        I'm using gvim with the visual studio plugin that can retreive (among
        other things) the compilation output into the quickfix window.

        My errorformat is:

        let &errorformat='%f(%l) : %t%*\D%n: %m,%*[^"]"%f"%*\D%l: %m,%f(%l) :
        %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m'

        I don't quite understand it completely, but it matches lines such as:

        some\relative\path\file.cpp|42|error...

        My question is, how can I make it understand, also, lines such as:

        2>d:\absolute\path\file.cpp|42|error...

        For now it just opens the file "2>d:\absolute\path\file.cpp", which does
        not (and cannot) exist. I believe the "2" (which can be any number) is a
        compilation counter (per lib compiled).

        Thanks in advance,


        --
        Étienne


        This output looks similar to that the "build.exe" DDK utility produces, as far as I remember, you can turn this numbering off there.

        Try to add "%*[0123456789]%*[>]" in the beginning of your error format, for example:

        :set errorformat=%*[0123456789]%*[>]%f(%l)\ :\ %t%*\\D%n:\ %m,%*[^\"]\"%f\"%*\\D%l:\ %m,%f(%l)\ :\ %m,%*[^\ ]\ %f\ %l:\ %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f\|%l\|\ %m


        Mikalai
         

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---

      • Mikalai Chaly
        ... I ve just found exact error format I ve used with build, it look shorter: set errorformat=%*[0-9 ]%f(%l) and so on. Mikalai
        Message 3 of 4 , Sep 30 12:45 PM
          On Wed, Sep 30, 2009 at 5:21 PM, Mikalai Chaly <nchaly@...> wrote:


          On Wed, Sep 30, 2009 at 4:13 PM, Tinou <tinoucas@...> wrote:

          Hello,

          I'm using gvim with the visual studio plugin that can retreive (among
          other things) the compilation output into the quickfix window.

          My errorformat is:

          let &errorformat='%f(%l) : %t%*\D%n: %m,%*[^"]"%f"%*\D%l: %m,%f(%l) :
          %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m'

          I don't quite understand it completely, but it matches lines such as:

          some\relative\path\file.cpp|42|error...

          My question is, how can I make it understand, also, lines such as:

          2>d:\absolute\path\file.cpp|42|error...

          For now it just opens the file "2>d:\absolute\path\file.cpp", which does
          not (and cannot) exist. I believe the "2" (which can be any number) is a
          compilation counter (per lib compiled).

          Thanks in advance,


          --
          Étienne


          This output looks similar to that the "build.exe" DDK utility produces, as far as I remember, you can turn this numbering off there.

          Try to add "%*[0123456789]%*[>]" in the beginning of your error format, for example:

          :set errorformat=%*[0123456789]%*[>]%f(%l)\ :\ %t%*\\D%n:\ %m,%*[^\"]\"%f\"%*\\D%l:\ %m,%f(%l)\ :\ %m,%*[^\ ]\ %f\ %l:\ %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f\|%l\|\ %m


          Mikalai
           

          I've just found exact error format I've used with build, it look shorter: set errorformat=%*[0-9>]%f(%l) and so on.

          Mikalai





          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---

        • Tinou
          ... I ve finaly got it working by setting an option: g:visual_studio_quickfix_errorformat to: %.%#%*[0-9 ] %#%f(%l) : %m visual_studio.vim uses it to
          Message 4 of 4 , Oct 1, 2009
            > I've just found exact error format I've used with build, it look
            > shorter: set errorformat=%*[0-9>]%f(%l) and so on.
            >
            > Mikalai
            >

            I've finaly got it working by setting an option:

            g:visual_studio_quickfix_errorformat

            to:

            '%.%#%*[0-9>]\ %#%f(%l)\ :\ %m'

            visual_studio.vim uses it to setlocal the efm...

            Discovered on the way the :cfile command, very helpful.

            It usually works, but sometimes VS gives me a relative path from god
            knows where... Anyway, I've found a work around (as I don't have the
            time to track down VS's start path for this or to make visual only
            output absolute paths -- is this possible ?).

            Thanks for the help!

            --
            Étienne

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