---------------------------------------------------------------------------------------------------------------
然后将下面代码编译, 修改产生的exe文件名为_run.exe
#include <cstdio>
#include <cstdlib>
#include <ctime>
int main(int argc, char **argv) {
char compiler[50] = {};
sprintf(compiler, "g++ %s.cpp -o %s.exe", argv[1], argv[1]);
char runcommand[50] = {};
sprintf(runcommand, "%s.exe", argv[1]);
if (system(compiler) == 0) {
int t = clock();
if (system(runcommand) == 0) {
printf("\nRun Time: %dms\n", clock() - t);
}
}
return 0;
}
将_run.exe放到和gvim.exe同一个目录下 。gvim配置windows下的gvim即配置完毕 。gvim配置
Linux下gvim配置文件_vimrc
打开Vim的启动设定,然后复制下面的代码并保存即可
"Vim for linux
source $VIMRUNTIME/mswin.vim
behave mswin
imap <c-d> <c-o>dd
imap <cr> <cr><left><right>
map o o<left><right>
imap <c-]> {<cr>}<c-o>O<left><right>
noremap <f6> =a{
syn on
colo desert
"colo torte
filetype indent on
set gfn=Courier\ 10\ Pitch\ 12
set ru nu et sta nowrap ar acd ww=<,>,[,] sw=4 ts=4 cin noswf
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-36207-2.html
虽然这次中国有点示弱
坚定完毕
日舰航速也普遍高于北洋舰队舰只