Ok, it’s not about compiling exactly, but recently I discovered the :compiler command in Vim. The help is included in the quickfix documentation, and as fas as I understood I could run:
:compiler perl
To select the perl interpreter. Then, the help says:
The Perl compiler plugin doesn’t actually compile, but invokes Perl’s internal
syntax checking feature and parses the output for possible errors so you can
correct them in quick-fix mode.
But as it’s unclear what should I to actually run the program. May I run :make, even without a make file? That makes sense to me, since:
echo &makeprg
Returns perl -Wc %. However…
Doing that on a bogus test program, only returns the standard errors formatting output, no quickfix window is opened. What am I missing here?
Just open the quickfix window with
Navigate errors with
Note that a common trap with quickfixing using a non-project make (i.e. where the makeprg variable usually includes the name of the current buffer (expansion of
%)), is that when the focus is on the quickfix window, issueing:makeagain will fail, because the quickfix buffer has no filename associated with it. Perhaps this could be fixed by supplying an artificial name for the quickfix window in e.g. the Perl compiler mode for vim?