Skip to content

Instantly share code, notes, and snippets.

View DominusDrow's full-sized avatar
:shipit:
ready to coding!!!

Alfredo Omar Vásquez López DominusDrow

:shipit:
ready to coding!!!
View GitHub Profile
@jaege
jaege / vimrc.vim
Created February 19, 2016 02:56
VIM autocmd to compile and run single source file.
if has("autocmd")
augroup vimrcCompileMap
" Remove ALL autocommands for the current group. This prevents having the
" autocommands defined twice (e.g., after sourcing the .vimrc file again).
autocmd!
" Map <F5> to save, compile and run single source file.
if has("win32")
autocmd FileType cpp nnoremap <buffer> <F5> :w<CR>:!cls && cl /EHsc % && %< <CR>
autocmd FileType python nnoremap <buffer> <F5> :w<CR>:!py % <CR>