vim配置

· · 个人记录

set nu
set mouse=a
set tabstop=4
set cindent
set showmatch
set autoindent
set smartindent
set softtabstop=4
set shiftwidth=4
set expandtab
set nocompatible
set backspace=2
set matchtime=5
inoremap ' ''<ESC>i
inoremap " ""<ESC>i
inoremap ( ()<ESC>i
inoremap [ []<ESC>i
inoremap { {<CR>}<ESC>kA
syntax on
map <F5> :call CompileRunGcc()<CR>
func! CompileRunGcc()
exec "w"
exec "!g++ % -Wall -Wextra -lm -o %<"
exec "!time ./%<"
endfunc