Questions tagged [makeprg]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
101 views

How to compile a program and open the output in a vertical terminal window?

How can I write a command that does the following? With one mapping, compile and/or run a program based on the filetype (*.c, *.cpp, *.js, *.py, etc.), and open a vertical terminal window with the ...
1
vote
1answer
78 views

How can I make vim ignore a filetype plugin's makeprg setting?

I am using a plugin that sets makeprg to some value specific to the filetype's programming language. I want to use my global setting instead, because I also use Makefiles. How can I do this? Thank you!...
3
votes
2answers
36 views

Debug how vim calls makeprg

I'm trying to set up pylint to work with :make command in Vim 8.2. I've set :compiler pylint but running :make gives me pylint's help message, so some arguments seem to be passed incorrectly. :set ...
1
vote
2answers
52 views

Check if :make fails

I just setup this mapping for my latex development: nnoremap <buffer> <LocalLeader>o :make %:r.pdf <Bar> !open %:r.pdf<CR><CR><CR> But I wondered about checking if ...
0
votes
1answer
30 views

error not formatted as per efm

I have created a mwe plugin to show my problem for fortran ft. tree ftrial ftrial ├── autoload │   └── makes.vim └── ftplugin └── fortran_mk.vim with cat ftrial/autoload/makes.vim " ...
0
votes
1answer
19 views

Quickfix stack doesn't work when using make -j

As mentioned in other questions, using make -C buildpath as makeprg in Vim and the appropriate errorformat triggers the nice handling of the quickfix directory stack. That is, the quickfix uses the "...
1
vote
1answer
89 views

How to change make command

In my ~/.config/nvim/ftplugin/tex.vim I have the following: set makeprg=pdflatex\ -halt-on-error\ -file-line-error\ -synctex=1\ % set errorformat=%f:%l:\ %m however when I run make the command that ...
0
votes
1answer
87 views

Quickfix won't parse :make output

My makeprg is set to: cd build/ && cmake --build . --config Debug && ctest && gdb -q -ex run ./a This allows me to build application, run tests and start debugging session ...
0
votes
0answers
23 views

How to use bash aliases in ftplugin files? [duplicate]

I want to be able to compile and run C++ files directly from inside vim. I have a custom compilation alias gmm defined in ~/.bash_aliases. I do not want to copy it over to my ~/.vim/ftplugin/cpp.vim ...
4
votes
3answers
734 views

Running make from vim

I would like to use vim as a c++ IDE. Is there a possibility to run "make" and see the "make" progression in a separate (newly opened) pane. Also, the consecutive execution of the binary would be nice....
0
votes
1answer
44 views

Bind makeprg to a shell command

I want to make something like this: let &makerpg = '[ -f Makefile] && make || cd build && [ -f Makefile ] && make || cd ../build && [ -f Makefile ] && make ...
1
vote
1answer
71 views

How do I remap the :make command to run a docker container?

I use a custom docker container to build my project so my "make" command is actually docker run --rm -v $(pwd):/src container make $arg. I'd like to be able to type :make $arg in command mode and ...
1
vote
1answer
121 views

How to show make command's output in vertically split buffer?

I want the behavior of :vnew term://make ts run-server but using the make command instead of invoking term. I have tried :make ts run-server | vert copen but that still takes over the entire terminal ...
2
votes
1answer
59 views

How to have two different makefile mapped to two different keys?

I am using F5 to compile my programs From my .vimrc set makeprg=make\ -f\ ~/makefile\ %< noremap <F5> :make<CR> But I want to add one other way to compile my programs which compiles a ...
2
votes
0answers
46 views

Configuring Multiple Compiler Plugins in a Single Project

Vim has compiler plugin feature which enables the user to write a compiler configuration, and then running :make will trigger the command, and errorformat will parse the output and will print any ...
3
votes
1answer
50 views

Default parameter for :make if $* is empty?

Is it possible to provide a default if $* is empty in a :make? I'd like to specify :makeprg so that: :make runs swift build :make foo bar runs swift foo bar.
2
votes
3answers
1k 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
273 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 ...
8
votes
2answers
343 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
399 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 ...
2
votes
1answer
449 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
331 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
465 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
122 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
38 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
570 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 ...
4
votes
1answer
4k 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
639 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
996 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
967 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
488 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
147 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
784 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, ...
20
votes
4answers
4k 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
395 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
338 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
627 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). ...
4
votes
1answer
400 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 ...