Wednesday, May 27, 2015

Re: quickfix / clist question

Hi Ben,

Thanks!.
You answer pointed me into the right direction.
by setting the errorformat correctly, the error disapeared.

Rgds,
Jeri

On Tue, May 26, 2015 at 4:51 PM, Ben Fritz <fritzophrenic@gmail.com> wrote:
On Tuesday, May 26, 2015 at 6:11:29 AM UTC-5, Jeri Raye wrote:
> Hi,
>
> I'm using gvim under windows 7
> I'm having a mapping that compiles my file in the current buffer like this:
>
> set makeprg=vcom\ %
> :map <F5> :w<CR>:make<CR>:clist!<CR>
>
> When I press F5 it compiles and gives the results back into "quick-fix" window.
> For example:
> +------+
> :!vom D:\counter.vhd >C:\Users\....tmp 2>&1
> "Start time: 13" -- no lines in buffer --
> (1 of 11) : 02 on May 26, 2015
> :clist!
> 1 Start time:
> 2: vcom ....
> 3: "Compiler output"
> [...]
> 10: End time ....
> 11: Errors: 0, Warnings 0
> Press ENTER to continue
> +------+
>
> All fine so far.
>
> When I then press enter, gvim opens en new buffer called 13 with no lines.
> This seems to be the result of the second line in the compiler output. ("Start time: 13" -- no lines in buffer --)
> Why is that?

Vim must parse the output of your compiler to extract things that look
like errors. Vim does this by trying each line to see if it matches with
any of the entries in the 'errorformat' option. For some reason, you
"Start time: 13" line is matching one of these entries (I don't
immediately see which entry by looking at the default value, but maybe
you aren't using the default value).

To prevent this, you must find or create a set of 'errorformat' strings
that actually match your compiler, instead of relying on Vim's defaults.

Once you have an appropriate option value, the best thing to do is to
place this setting *and* your 'makeprg' setting into a compiler plugin,
so that you simply do this to compile:

  :compiler vcom
  :make

See the following topics:
  :help compiler-plugin
  :help compiler-select

--
--
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@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment