Created
May 7, 2013 08:56
-
-
Save akira093/5531240 to your computer and use it in GitHub Desktop.
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
" C | |
autocmd FileType c nnoremap <buffer> <F5> :call <SID>execGcc()<CR> | |
autocmd FileType c nnoremap <buffer> <F6> :call <SID>runC()<CR> | |
autocmd FileType c nnoremap <buffer> <F7> :call <SID>runCToFile()<CR> | |
function! s:execGcc() | |
:w | |
exe ":!gcc % -lm -O2 -o %.out" | |
endfunction | |
function! s:runC() | |
exe ':!' . expand('%') . '.out' | |
endfunction | |
function! s:runCToFile() | |
exe ":!./%.out > %.data" | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment