vim中F5编译运行代码
发布时间:2020-12-15 23:18:24 所属栏目:安全 来源:网络整理
导读:map F5 :call CompileRunGcc()CRfunc! CompileRunGcc() exec "w" if filetype == ‘c‘ exec "!g++ % -o %" exec "!time ./%" elseif filetype == ‘cpp‘ exec "!g++ % -o %" exec "!time ./%" elseif filetype == ‘java‘ exec "!javac %" exec "!time ja
map <F5> :call CompileRunGcc()<CR> func! CompileRunGcc() exec "w" if &filetype == ‘c‘ exec "!g++ % -o %<" exec "!time ./%<" elseif &filetype == ‘cpp‘ exec "!g++ % -o %<" exec "!time ./%<" elseif &filetype == ‘java‘ exec "!javac %" exec "!time java %<" elseif &filetype == ‘sh‘ :!time bash % elseif &filetype == ‘python‘ exec "!time python2.7 %" elseif &filetype == ‘html‘ exec "!firefox % &" elseif &filetype == ‘go‘ exec "!go build %<" exec "!time go run %" elseif &filetype == ‘mkd‘ exec "!~/.vim/markdown.pl % > %.html &" exec "!firefox %.html &" endif endfunc (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 容器技术之Dockerfile(一)
- scala – 向ActorSystem中的所有actor发送消息
- scala – 为什么不一些(List(1,2,3)).flatten compile?
- 以Angular2形式输入掩码字段
- Bootstrap3基础 栅格系统 1行最多12列
- twitter-bootstrap – 禁用Bootstrap 3导航栏在中视口大小的
- scala – Slick:过滤所有joda DateTime日期等于今天的记录
- f和t命令在Vim中做什么?
- 如何让StructureMap使用AngularJs / MVC5和WebApi2 Web项目
- angularjs – Angular typeahead,设置自定义弹出模板