• Sublime text3 配置c++环境 并设置快捷键


    VScode配c++环境太麻烦了 打算用sublime写C++ 记录一下配置过程
    因为我是有DEV环境的 直接将MINGW64加入环境变量即可 在DEV文件夹下的MinGW64in(就是有g++.exe的那个文件夹)

    加到PATH里面就行

    然后新建编译系统:

    点“新建编译系统”

    然后将文件改为:

    {
        "cmd": ["g++","-Wall", "${file}", "-o", "${file_path}/${file_base_name}"],
        "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
        "working_dir": "${file_path}",
        "selector": "source.c, source.c++",
        "encoding":"cp936",
        "variants":
        [
            {
            "name": "Run",
            "cmd": ["cmd", "/c", "g++", "-Wall","${file}", "-o", "${file_path}/${file_base_name}", "&&", "cmd", "/c", "${file_path}/${file_base_name}"]
            },
            {
                "name": "RunInCommand",
                "cmd": ["cmd", "/c", "g++", "-Wall","${file}", "-o", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "${file_path}/${file_base_name} & echo.&pause"]
            }
        ]
    }

    保存即可

    然后设置运行快捷键:
    在首选项里点快捷键设置:
    添加:

    [
        {
            "keys": ["f11"], 
            "command": "build", 
            "args": {"variant": "RunInCommand"}
            }
    ] 

    这样每次点f11就是在cmd里运行了

  • 相关阅读:
    单词接龙
    洛谷 P1015 回文数
    洛谷 P1012 拼数
    codevs 2780 ZZWYYQWZHZ
    专项练习之字符串
    模拟题1
    专项训练之线段树
    复习题之求后序遍历
    复习题之二叉树的遍历
    Hdu 3037 Saving Beans(Lucus定理+乘法逆元)
  • 原文地址:https://www.cnblogs.com/dyhaohaoxuexi/p/11657858.html
Copyright © 2020-2023  润新知