To work with
pascal files, my
.vimrc contains this code:
"" Work with pascal files augroup make_pascal autocmd! autocmd FileType pascal :compiler fpc autocmd FileType pascal :set makeprg=clear;\ fpc\ % augroup END
To demonstrate the issue I am experiencing see this easy hello-world-like demonstration code written in
pascal which intentionally contains an error:
program EasyExample (output); begin writeln ('Correct line.'); thisWillCauseAnError; end.
When I run
:make on this file with my Vim cursor in any line that does not contain the error, everything works fine: the external
fpc compiler gets called and aborts compilation due to an error. After pressing
ENTER I get back to my source code and the cursor is in the line that contains the error, and the error message is displayed at the bottom.
But when I run
:make on this file with my Vim cursor in the line that does contain the error, an additional step is added (and I would like to remove it): After the compilation abortion pressing
ENTER does not get me back to my source code, but instead a new "window" (is that the quickfix list?) is shown with the following text at the bottom:
(5 of 8): Error: Identifier not found "thisWillCauseAnError"
Press ENTER or type command to continue
ENTER again I see my source code again, the cursor in the line that contains the error, and the error message is displayed at the bottom.
How do I get rid of that additional "window" that appears, so that the behaviour when running
:make is always the same (i.e. press
ENTER once to see my source code with highlighted error)?