map <F5> :call CompileRunCL()<cr>
使用F5 鍵編譯並運行
map <F7> :call CompileCL()<cr> 使用F7鍵進行編譯
func! CompileRunCL()
" save files
exec "w"
" compile file using /GX
exec "!cl % -o %< -nologo /GX"
" run the result
exec "! %<.exe"
exec "i"
endfunc
func! CompileCL()
exec "w"
exec "!cl % -o %< -nologo /GX"
exec "i"
endfunc
map <F7> :call CompileCL()<cr> 使用F7鍵進行編譯
func! CompileRunCL()
" save files
exec "w"
" compile file using /GX
exec "!cl % -o %< -nologo /GX"
" run the result
exec "! %<.exe"
exec "i"
endfunc
func! CompileCL()
exec "w"
exec "!cl % -o %< -nologo /GX"
exec "i"
endfunc