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

Progressive quickfix error buffer (AKA how to reload make errorfile?)

Expand Messages
  • Gregory McIntyre
    I am trying to set up gvim 7 on Linux to function the way emacs does when you compile a program (M-x compile). That is, I would like: - the window to split,
    Message 1 of 1 , Sep 28, 2006
    • 0 Attachment
      I am trying to set up gvim 7 on Linux to function the way emacs does
      when you compile a program (M-x compile). That is, I would like:

      - the window to split, creating a compilation buffer (like :copen / :cwin)
      - vim to execute the compilation in a sub-process
      - vim to not bother me with a hit-enter prompt
      - vim to capture the output of the compilation so that it does not
      interrupt my editing by spewing all over the screen (I can do this by
      setting shellpipe but it still does a hit-enter prompt)
      - vim to update the quickfix buffer as it receives each line from the
      compile process output

      I can get *close* to this behaviour using copen, setting the shellpipe
      command and using the vim server and a custom script, similar to this
      post:

      http://tech.groups.yahoo.com/group/vim/message/59520

      This solution is a bit messy and has problems. The main thing it lacks
      is progressively updating the quickfix buffer as the compilation
      progresses.

      I was wondering if there were any other people here who had (perhaps
      more recently) tried making this work.

      Also, if people are interested in making this work, I am prepared to
      fiddle for hours to get it and discuss options on this list until it
      does work. ;) Maybe even modify some vim source code.

      I think my best bet at making this work just the way I want it is to
      specify a shellpipe to pipe all output to my own script, set some
      option to rid myself of the hit-enter prompt, in my own script fork
      and return (so I can keep editing) but in the child process, eat up
      stdin and write it to vim's make errorfile, periodically sending
      commands to the vim server to refresh the quickfix buffer from disk.

      I could probably manage that, except that
      - I can't get rid of the hit-enter prompt
      - I don't understand (yet) the logic of reloading the quickfix
      buffer. It seems to only reload after a :make. "autoread" doesn't seem
      to work on it, for instance. Still playing with this.

      Any hints or pointers would be welcome.

      --
      Greg McIntyre
    Your message has been successfully submitted and would be delivered to recipients shortly.