我习惯于使用make
,因为make
后可以方便的调用出quickfix
,是改错更方便,而且他带有跳转功能。
set t_Co=256
set nu
set si
set sc
set is
set cin
set ls=2
set ts=4
set sw=4
set sts=4
set mouse=a
color ron
"make
set mp=g++ -o %< %
map <F5> :call MAKE()<CR> i
imap <F5> <esc>:call MAKE()<CR> i
func MAKE()
exec "w"
exec "make"
exec "cw"
endf
map <F6> <esc>:!./%<<CR>
imap <F6> <esc>:!./%<<CR>
map <C-b> :cprevious<CR>i
map <C-n> :cnext<CR>i
imap <C-b> <esc>:cprevious<CR>i
imap <C-n> <esc>:cnext<CR>i
"移动
map <c-up> <c-y>
map <c-down> <c-e>
imap <c-up> <esc><c-y>a
imap <c-down> <esc><c-e>a
" cat
map <F12> :call Print()<CR>
func Print()
exec "w"
exec "!cat %"
endf
"gdb
map <F8> :call Gdg()<CR>
func Gdg()
exec "w"
exec "!g++ % -o %< -g && gdb %< -q"
endf
"run
"map <F5> :call Run()<CR>
"imap <F5> <esc>:call Run()<CR>
func Run()
exec "w"
exec "!g++ % -o %< && ./%<"
endf
为什么markdown
不支持vimscript
语言。。。