个人Blog: hhktony.com
全部博文(553)
分类: LINUX
2012-03-01 03:45:28
" F5编译和运行C程序,F6编译和运行C++程序,F7运行Python程序,F10 gdb调试
" 请注意,下述代码在windows下使用会报错,需要去掉./这两个字符
"
map
func! CompileRunGcc()
exec "w"
exec "!gcc % -o %<"
exec "! ./%<"
endfunc
"< F6> 编译和运行C++
map
func! CompileRunGpp()
exec "w"
exec "!g++ % -o %<"
exec "! ./%<"
endfunc
"
map
"
map
func! CompileRunSH()
exec "w"
exec "!chmod a+x %"
exec "!./%"
endfunc
"
map
func! Debug()
exec "w"
exec "!gcc % -o %< -gstabs+"
exec "!gdb %<"
endfunc