zoukankan      html  css  js  c++  java
  • compile c cpp with cl.exe in vim

    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>
    
  • 相关阅读:
    python3 内置函数
    python3 模块和包
    python3 面向对象编程
    vue.js的devtools安装
    数组对象排序
    插件资源库
    Vue.js 2.0生命周期
    vue学习--自定义全局vue组件
    搭建VUE项目
    入职新公司
  • 原文地址:https://www.cnblogs.com/otfsenter/p/7728897.html
Copyright © 2011-2022 走看看