Questions tagged [make]
The make tag has no summary.
13 questions
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 ...
4 votes
1 answer
352 views
Vim switches buffers autonomously
I've just encountered a new undesired behavior in Vim, possibly related to the :make command: I have a makefile with a check target that runs a Gtk4 GUI app that I'm working on. When I dismiss the app ...
1 vote
1 answer
1k views
How to correctly set up :make for building Vim?
My question could fairly be a duplicate of this, but I hope I'm making it critically different by asking about :makeing Vim itself and having a meaningful quickfix window. (In reality, my use case is ...
2 votes
3 answers
175 views
How to fold away C++ system headers in quickfix window?
If I make a mistake in a class in some C++ code, I'll typically get a ton of messages from the compiler about how hard it's tried to find something suitable in system header files. This floods the ...
3 votes
3 answers
543 views
How can I create mappings to execute specific Vim commands, depending on if a makefile exists?
In general, I have makefiles setup anytime I'm working on C projects. To save and compile these projects, I've bound the ' key to do this: map ' :wa<CR>:!make<CR> However, I sometimes ...
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 ...
4 votes
1 answer
170 views
How do I prevent the :make command to behave like a external command?
When I use :make, the command first shows me the shell and has me press Enter and only then do I get to the actual error in the file. Is there a reason for this behaviour ? Can I get rid of it ?
1 vote
0 answers
46 views
How can I compensate for vim and make not using the same working directory?
I have a project where make and vim are run from different directories. The project structure looks like this: root/ ├── build │ └── gmake_linux │ ├── bin │ │ └── Debug │ ...
0 votes
1 answer
601 views
Automatically launch debugging session if make succeeds, quickfix list otherwise
Currently, I have begun using vim for C++ projects. I use vimspector for debugging help. This offers a command :call vimspector#Launch() to debug the current successful build. To build the current ...
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
2 answers
617 views
Can I execute the make command only on selected lines?
Let's say I have the following script: sudo apt update sudo apt upgrade sudo apt install jq sudo apt install jo If I use the command :set makeprg=bash\ % | make inside Vim, the system will ask me my ...
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
2 answers
294 views
How do you prevent a new window from opening when running :make
Whenever I run :make in Vim, it always takes control away from my buffer, places me in a temporary view where I see the makeprg's output and then prompts me to "Press ENTER or type command to ...