New answers tagged filetype-c
0
votes
Edit compile and run cycle
For the sake of completeness, similar to what Kaz outlined before, but even simpler. Simply add a target to your executable with the appropriate requirements:
build/bin/run: 1.cpp
g++ -Wall $< ...
1
vote
Edit compile and run cycle
You can just add running the program to the Makefile as a target: for example, one named run. Then you just :make run.
run has a dependency on the program, to make sure that the program is created or ...
1
vote
Accepted
Edit compile and run cycle
Assuming you have the makeprg set up correctly:
let &l:makeprg = 'cd build && make'
The &l: syntax for let sets local variables; you can also use setlocal but then you need to use ...
2
votes
Edit compile and run cycle
At this moment detecting whether the compilation has successfully ended to chain with something else requires scripting.
For more detailed explanations/example, see this SO Q/A: https://stackoverflow....
Top 50 recent answers are included
Related Tags
filetype-c × 42filetype-c++ × 14
syntax-highlighting × 13
indentation × 8
vimrc × 5
neovim × 3
comments × 3
ide × 3
vimscript × 2
folding × 2
formatting × 2
tags × 2
snippets × 2
key-bindings × 1
search × 1
autocompletion × 1
microsoft-windows × 1
highlight × 1
save × 1
ctags × 1
plugin-coc × 1
original-vim × 1
plugin-ale × 1
makeprg × 1
ins-completion × 1