pappercut 于 2010-01-17 14:58:43发表:
:0w5ty(1最后还是自己找到解决方法了。。。。[code]:0w5ty(1最后还是自己找到解决方法了。。。。 func! CompileRunGplusplus_m(argc, ...) exec "w" exec "!gcc % -g -o %<.o" let s:i = 0 let s:run_string = "! ./%<.o" for s:i in range(1, a:argc) let s:run_string.=" ".a:{s:i} endfor exec s:run_string endfunc command -nargs=* Runc :call CompileRunGplusplus_m()[/code]
pappercut 于 2010-01-17 14:58:43发表:
:0w5ty(1最后还是自己找到解决方法了。。。。[code]:0w5ty(1最后还是自己找到解决方法了。。。。
)[/code]
func! CompileRunGplusplus_m(argc, ...)
exec "w"
exec "!gcc % -g -o %<.o"
let s:i = 0
let s:run_string = "! ./%<.o"
for s:i in range(1, a:argc)
let s:run_string.=" ".a:{s:i}
endfor
exec s:run_string
endfunc
command -nargs=* Runc :call CompileRunGplusplus_m(