Created
July 1, 2015 06:51
-
-
Save dahu/f8c4f0ed68dd63df82cf to your computer and use it in GitHub Desktop.
Poor man's make
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" poor man's make | |
" Barry Arthur, July 2015 | |
function! MK() | |
cclose | |
write | |
let res = system('gcc -std=c++11 ' . shellescape(expand("%"))) | |
if ! v:shell_error | |
exe "! ./a.out" | |
else | |
call writefile(split(res, "\n"), 'errors') | |
cf errors | |
copen | |
endif | |
endfunction | |
nnoremap <f5> :call MK()<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment