syntax on
set number
set showmatch
set autoindent
set smartindent
set tabstop=2
set shiftwidth=2
set mouse=a
map <F5> : call Compile() <CR>
func! Compile()
exec 'w'
exec '!g++ % -o -lm -Wall %<'
exec 'time ./%<'
endfunc
原文:https://www.cnblogs.com/newbielyx/p/11864377.html