Quickfix list populated when using :make but not with !cmake

37 views
Skip to first unread message

Uday Reddy B

unread,
Sep 27, 2019, 3:50:18 AM9/27/19
to v...@vim.org
Hello,

I notice that the quickfix list and cycling through errors does not work when using ':!cmake ...' but works when using exactly the same command by setting 'let &makeprg="cmake ...' and then ':make'. 

Would there be a way to get the former working as is? Thanks!


Christian Brabandt

unread,
Sep 27, 2019, 3:54:16 AM9/27/19
to v...@vim.org
No that is not possible. The :! command, always starts an external
command from your shell. Vim does not parse the output (and doesn't even
know what kind of command is started). That's why Vim has introduced the
:make command.

Best,
Christian
--
Durch Abwesenheit seine Hochschätzung oder Verehrung befördern: Wie
die Gegenwart den Ruhm vermindert, so vermehrt ihn die Abwesenheit.
-- Baltasar Gracián y Morales (Handorakel und Kunst der Weltklugheit)

Uday Reddy B

unread,
Sep 28, 2019, 1:31:04 AM9/28/19
to Christian Brabandt, v...@vim.org
On Fri, Sep 27, 2019 at 1:24 PM Christian Brabandt <cbl...@256bit.org> wrote:

On Fr, 27 Sep 2019, Uday Reddy B wrote:

> Hello,
>
> I notice that the quickfix list and cycling through errors does not work when using ':!cmake ...' but works when using exactly the same command by setting 'let &makeprg="cmake ...' and then ':make'. 
>
> Would there be a way to get the former working as is? Thanks!

No that is not possible. The :! command, always starts an external
command from your shell. Vim does not parse the output (and doesn't even
know what kind of command is started). That's why Vim has introduced the
:make command.

Thanks very much - makes sense. On this note, I notice that the :make command does not yield any colors in its output (for eg. the compiler errors that appear in red) while the same command via "!cmake ...' yields colors the same way it does on the shell. This was one reason I was trying to see if the quickfix list could work through an external command. 

- Uday

 

Best,
Christian
--
Durch Abwesenheit seine Hochschätzung oder Verehrung befördern: Wie
die Gegenwart den Ruhm vermindert, so vermehrt ihn die Abwesenheit.
                -- Baltasar Gracián y Morales (Handorakel und Kunst der Weltklugheit)

--
--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190927075405.GC5154%40256bit.org.
Reply all
Reply to author
Forward
0 new messages