The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [makeprg]

The program that will be run when the `:make` command is executed.

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

Running a command after makeprg successfully runs

I have a workflow where I build on one machine and copy the result to a different machine for testing. Currently I use vim-dispatch for running make in the background. What I would like to be able to ...
1
vote
3answers
696 views

Open quickfix window without focusing it

I run my make commands asynchronously in vim with the asyncrun plugin. I use this code in my .vimrc to open the quickfix window automatically everytime I run an asynchronous make command in order to ...
1
vote
2answers
151 views

Running vim's ':make' using ':term'

Is there a way that I can have the :make command output itself to a terminal window in vim? In the 8.1 release, they added the :term command, which allows you to run an external program in a vim ...
7
votes
2answers
231 views

How to capture errors from make in terminal window

Vim 8.1's release note seems to indicate that you can feed output from make running in a terminal window to a quickfix list, but I couldn't find any detailed explanation. Is there a way to do this ...
2
votes
1answer
249 views

Quickfix navigation not working properly

I'm trying to lint my C files inside vim. I know that quickfix should help in this case. I found the following pc-lint file maintained by Craig Emery. I have this file in vim/vim80/compiler. if ...
0
votes
0answers
119 views

Errors/warnings from :make are not shown correctly

So far I've been compiling projects from within Vim by suspending it with Esc and Ctrl + Z, running make (btw, I'm using the gfortran compiler and, should it be important, using the mpifort wrapper, ...
2
votes
1answer
309 views

Using an interactive interpreter as makeprg

Is there any way to use an interactive interpreter as the makeprg? I want the interpreter to stay interactive after invoking :make. For example, if I wanted to invoke python on the current file and ...
2
votes
1answer
207 views

How to set up compiler globally?

In my vimrc, I have a compiler myCompiler. When the editor starts up, everything is fine. When I switch to a new file, the compiler settings (makeprg and errorformat) revert to their defaults. How ...
1
vote
2answers
284 views

Silencing :make command

I am setting makeprg to perl % to run my Perl script (if there's a better way, I'm up for that, too), and it works just fine, except that it reproduces the first line of output prefixed with the text "...
0
votes
1answer
93 views

vim :make :cwindow, I need error length character limit larger than 1000

I am compiling a program with :make command, then I examine g++ errors using :cwindow. The problem is that the error produced by g++ is longer than 1000 characters and it is cut. Currently I have to ...
1
vote
0answers
35 views

Can't hide quickfix before executing makeprg

I'm trying to hide the quickfix window while building, so that it doesn't show outdated info. I can, of course, execute :ccl at any time to close quickfix. Additionally, I've used autocmd to call a ...
1
vote
2answers
360 views

How to redirect a make program's stdout when using it in Vim?

I use Google closure-compiler to check syntax errors in a JS file, the problem is that if there is no error it gives the source of the file to its STDOUT and with the default settings this counts as ...
2
votes
1answer
3k views

How to escape pipe character in `:make`, `:grep` and friends

I'm trying to use :grep to search for one of several words. Since grep accepts regular expressions, I figured I could just use the pipe character | to build a single expression for both words: :grep -...
1
vote
1answer
441 views

How to run make in Vim, open results in split window and show the compilation time?

I would like to run :make in Vim, while also allowing the user to edit a file while we're waiting for the compilation to finish, then when the compilation is finished open the result in a split window ...
2
votes
2answers
479 views

How to customize % symbol in makeprg command

When I set makeprg using: set makeprg=gcc\ -Wall\ -g\ %\ -o\ % and then invoke :make Vim does not pass proper filenames, because this command is translated as: gcc -Wall -g file.c -o file.c and ...
3
votes
2answers
572 views

How to set up a Build > Make > Run cycle for a C++ project?

I am trying to come up with a way to handle C++ projects with Vim. I have sorted out syntax and code completion etc. to some extend. Now, I am curios to hear about how people handle their Build > Make ...
1
vote
2answers
375 views

maven colored logging breaks filepath

If I use the color logging for maven, the file path is corrupted by the coloring syntax: ^[[1;31m[ERROR]^[[m /home/foo/bar/src/main/java/com/domain/bar/App.java instead of [ERROR] /home/foo/bar/src/...
6
votes
1answer
109 views

Returning from :make to source code has sometimes a step too much

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;\...
3
votes
1answer
594 views

Terminal setup when running make from Vim

What exactly is Vim doing when executing the :make command? I was expecting that it just executes the content of the makeprg variable just like running :!make and additionally collects the output, ...
17
votes
4answers
2k views

Quickfix support for Python tracebacks

Say I have a python script with a runtime error: $ cat example.py #! /usr/bin/env python3 a = 1/0 which gives: $ python3 example.py Traceback (most recent call last): File "example.py", line ...
2
votes
1answer
344 views

Why is make running against a wrong file?

I am trying to get VIM to run the right makefile for a specific source file. For example, if the current file is ui8_c_buff_test.cpp and if I use the makeprg configuration below and run make, let &...
3
votes
1answer
261 views

Determining makefile based on source file name

For current source file with the following name pattern: xxx_test.cpp how do you execute make file with the following patter xxx.makefile. I tried using set makeprg=make\ -f\ fnameescape(substitute(...
0
votes
1answer
552 views

Make: Nothing to be done for 'build'

I am using a Gradle compiler plugin for Vim. I run :compiler gradle and then :make build, and Gradle build is executed and error results properly parsed (many thanks to @lcd047 answering my question). ...
3
votes
1answer
356 views

Vim ErrorFormat question for Gradle compiler plugin

I am trying to fix a compiler plugin for Gradle. Gradle generates error messages of the type: :compileJava/file/path/Main.java:52: error: cannot find symbol public static ABC abc; ...
4
votes
2answers
1k views

Quickfix with makeprg running in a different directory

How can I start a build with my makeprg running in a different directory than the working directory of vim and still catch errors in quickfix so that I can jump between them? The problem is that ...