其他分享
首页 > 其他分享> > Sublime Text4 安装与配置记录

Sublime Text4 安装与配置记录

作者:互联网

Sublime Text作为一款优质的Code编辑器,已更新至第4个版本,本文记录关于Sublime Text 4【版本4126】的安装、汉化,以及常用配置方法。

安装

汉化

破解【反汇编】

配置Java环境

配置C/C++环境

C/C++的编译,需要使用gcc完成,因此需要先安装MinGW软件

安装配置MinGW

下载

MinGW官网:http://mingw-w64.yaxm.org/doku.php

可选择下载【执行文件】或【压缩包】

安装

配置环境变量

进入MinGW的【安装路径】或【解压缩路径】下的【mingw64/bin】路径(注意一定是bin路径下),点击资源管理器中的【路径】进行复制

image-20220206111317718

桌面右击【此电脑】;点击【属性】;点击左侧的【高级系统设置】;选择【高级】选项卡;点击底部【环境变量】;选择【系统变量】中的【Path】;点击【编辑】;点击【新建】;粘贴所复制的路径后保存

测试

按下快捷键【Win+R】;输入【cmd】进入命令窗口;输入【gcc -v】,出现版本信息而非报错信息,则证明配置成功(如图)

image-20220206111537182

配置C/C++

点击【工具 --> 编译系统 --> 新建编译系统】;使用【Ctrl+A】全选新建的代码;粘贴如下代码替换模板内容

{ 
    "cmd": ["g++", "${file}", "-std=c++11", "-o", "${file_path}\\\\${file_base_name}", "&", "start", "cmd", "/c", "${file_path}\\\\${file_base_name} & echo. & pause"],
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}",
    "selector": "source.c, source.c++", "shell": true,
    "encoding":"cp936", 

    "variants":
    [
        {
            "name" : "Build Only",
            "cmd":["g++", "${file}", "-std=c++11", "-o", "${file_path}\\\\${file_base_name}"]
        },
        {
            "name" : "Run Only",
            "cmd" : ["start", "cmd", "/c", "${file_path}\\\\${file_base_name} & echo. & pause"]
        },
        {
            "name" : "Pipe Build and Run",
            "cmd":["g++", "${file}", "-std=c++11", "-o", "${file_path}\\\\${file_base_name}","&","${file_path}\\\\${file_base_name}", "<","${file_path}\\\\in",">","${file_path}\\\\out"]
        },
        {
            "name" : "Pipe Run Only",
            "cmd" : ["${file_base_name}", "<","in",">","out"]
        },
        {
            "name" : "Project Build & Run",
            "cmd" : ["g++", "${file_path}\\\\*.cpp", "-std=c++11", "-o", "${file_path}\\\\project", "&", "start", "cmd", "/c", "${file_path}\\\\project & echo. & pause"]
        },
        {
            "name" : "Project Build Only",
            "cmd" : ["g++", "${file_path}\\\\*.cpp", "-std=c++11", "-o", "${file_path}\\\\project"]
        },
        {
            "name" : "Project Run Only",
            "cmd" : ["start", "cmd", "/c", "${file_path}\\\\project & echo. & pause"]
        }
    ]
}

参考博文

参考项 地址
破解方法 https://blog.csdn.net/k73668187/article/details/122283494
配置Java环境 https://www.jianshu.com/p/14d7d1295c9c
配置C/C++环境 https://blog.csdn.net/a19990412/article/details/82658981

<- 完 ->

标签:Text4,cmd,Only,file,path,安装,Sublime,name
来源: https://www.cnblogs.com/gelingyu/p/15868030.html