vim配置

我习惯于使用make,因为make后可以方便的调用出quickfix,是改错更方便,而且他带有跳转功能。

set nu
set si
set sc
set is
set cin
set ts=4
set sw=4
set sts=4
set mouse=a
color zellner
"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语言。。。

vim配置

上一篇:《linux就该这么学》第四课


下一篇:Linux 常用命令