Questions tagged [makeprg]
The program that will be run when the `:make` command is executed.
60 questions
0 votes
0 answers
48 views
Why is my errorformat not capturing "module"?
I'm using this errorformat: vim.opt_local.errorformat = table.concat({ '%Z', -- Consider any blank line to be the end of a multiline message '%E%>Failure:', -- "Failure:" Start ...
0 votes
1 answer
46 views
I cannot make $* to work when I define &makeprg
I don't understand how to make $* to work when I set &makeprg. For example, if I set &makeprg = 'pandoc --from=markdown --output %:p:r:S.$* -- %:p:S' and I run make html, then the $* is not ...
0 votes
1 answer
224 views
Cannot read from .tmp file error when using make (E282)
I have a script that include the following lines: &l:makeprg = $'manim {expand("%:t")} {scene} {flags} --fps 30 --disable_caching -v WARNING --save_sections' make The command runs ...
1 vote
2 answers
101 views
How to save the current compiler?
Say that I have a compiler/foo.vim compiler file. Next, I want to define a command that changes compiler, runs it and changes the compiler back to the original. For example: command! MyCommand { ...
3 votes
4 answers
1k views
Working with large Visual Studio oriented codebase
I have been using Vim for about 2 years on my personal C++ project on Ubuntu with great success. I build using g++ and make, as my build system. In vim, I can build the project without problem using :...
0 votes
1 answer
120 views
Provide console (stdin) input to program when compiled and run with :make?
Is it possible to run a blocking input statement in your code when it is run from within the vim buffer? For example: #include <iostream> int main(void) { int x; std::cin >> x; ...
1 vote
0 answers
107 views
Makeprg runs in different directory than `pwd`
When I run a command using make, it runs from a different directory than running it as a regular command with !. My app is a CBRA, and I open vim from within a component. The top-level app, though, is ...
0 votes
2 answers
347 views
Translate file paths in quickfix list
I'm using msys + vim + ninja + MSVC on windows. When building, the quickfix list has errors that use the windows path, ie c:\work\folder\file.cpp Vim handles it ok-ish, it can open the files, but ...
2 votes
4 answers
855 views
Edit compile and run cycle
I've just got the hang of the wonders of :make and the ability to cycle through the errors. Obviously, I have to do a set makeprg with the settings I need and everything is nice, but the problem is ...
0 votes
1 answer
220 views
Is this :compiler script configured properly for pylint, a python linter?
I am pretty new to Vim and coding in general. I'm trying to improve my compile-edit-compile cycle for Python. I just learned about Vim's :make and quickfix system; it's really cool. I would like to do ...
1 vote
2 answers
5k views
Make and run from vim
I just got into :make and I love the ability to browse the errors. However, in my usual workflow, I am interested in running make and then running some executable. So my to-go option so far was to run ...
1 vote
1 answer
94 views
Issue with makeprg Shell Script $? Variable
I have the following .vimrc: let &makeprg="./run-tests" The contents of run-tests: #!/bin/sh error_file=$(mktemp) coverage run --source "$PWD" --branch -m pytest tests/ >&...
1 vote
1 answer
263 views
How can I return to the file that I'm editing when I execute it from inside Vim?
Let's say that I have the following node.js script: console.log("test") If I use the command :set makeprg=node\ % | set autowrite | make I'll execute this node.js code and see the following ...
1 vote
1 answer
166 views
Change Directory with Errorformat
I'm trying to write an errorformat for JUnit. Directory structure from cwd is: unsw/piazza/PiazzaForum.java unsw/piazza/Thread.java unsw/test/PiazzaTest.java Amongst all the cruft outputted by JUnit, ...
1 vote
4 answers
858 views
How to Create Sublime-Like Build Systems in Vim?
I am currently new to neovim. Something that has me a bit stuck is being able to easily run my code. The text editor I used before trying out vim was Sublime Text 3, and, in that text editor, all I ...