标签:style blog color 文件 ar div log file
vim 文件检测删除文件,使得F5编译的时候不重复执行上次产生的程序
func! CompileRunGpp() exec "w" let temp = "/home/darkdream/problem/exe/ " "后面留一个空格以便替换 let outfilename=substitute(temp," ",expand("%<"),‘g‘) “将空格替换成文件名去后缀 if filereadable(substitute("/home/darkdream/problem/exe/ "," ",expand("%<"),‘g‘)) ”检测文件是否存在 silent exec "! rm ".outfilename “删除文件 endif silent exec "!g++ % -o /home/darkdream/problem/exe/%<" exec "! /home/darkdream/problem/exe/%<" ”编译运行文件 endfunc
标签:style blog color 文件 ar div log file
原文地址:http://www.cnblogs.com/zyue/p/3885772.html