1 touch a clc.bat
@echo off
set f1=%1
set f2=%f1:.c=%
:: Load compilation environment
call "C:UsersadministratorAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0vcvarsall.bat"
:: Invoke compiler with any options passed to this batch file
"C:UsersadministratorAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCincl.exe" %f1%
echo --------------------------------------------------------------------------------------
%f2%
2 touch a clcpp.bat
@echo off
set f1=%1
set f2=%f1:.cpp=%
:: Load compilation environment
call "C:UsersadministratorAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0vcvarsall.bat"
:: Invoke compiler with any options passed to this batch file
"C:UsersadministratorAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCincl.exe" %f1%
echo -----------------------------------------------------------------------
%f2%
3 add clc.bat clcpp.bat to env
4 _vimrc
autocmd filetype c nnoremap <F5> :w! <bar> exec '!clc '.shellescape('%')<CR>
autocmd filetype cpp nnoremap <F5> :w! <bar> exec '!clcpp '.shellescape('%')<CR>