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

Re: :make problem

Expand Messages
  • Colin Keith
    ... Vim s using the output from make and the filenames in that output are relative to the directory your script changes you into. I.e. /home/colin/
    Message 1 of 2 , Sep 3, 2002
    • 0 Attachment
      On Tue, Sep 03, 2002 at 03:02:51PM -0400, Charles Liu wrote:
      > How can I fix this problem?

      Vim's using the output from make and the filenames in that output are
      relative to the directory your script changes you into. I.e.

      /home/colin/ <--- vim is here
      projects/ <--- script cd's here
      project1/prog.c

      What vim sees is an error in "project1/prog.c", but it doesn't know about
      the chdir, so it opens the file relative to its own directory, I.e.


      /home/colin/project1/prog.c

      Set vim's cd to your subdirectory?


      :cd /home/colin/projects/

      Of course that might stick, so you might be able to fix the output from
      'make' to have the correct filenames by changing &shellpipe:

      :set shellpipe=\|&sed\ 's%^\\(.*\\):\ %projects/\\1:\ %'\ \|&\ tee

      oh, or as the help docs say, set this in &mp - see "Filtering Messages"
      at the end of section 7 (just above ":help quickfix-directory-stack")

      Maybe some help?

      Colin.
    Your message has been successfully submitted and would be delivered to recipients shortly.