环境变量
C:\MinGW\bin;D:\C++\MinGW64\bin\g++.exe;D:\Java\jdk-14\bin;D:\Python;D:\Python\Scripts;D:\Python\chromedriver.exe;C:\Users\Meul\Desktop\All\云班课打包(2)\源代码;C:\windows\system32;"%SystemRoot%\system32;";"%SystemRoot%;";"%SystemRoot%\System32\Wbem;";%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
python配置
{
"cmd": ["D:/Python/python.exe","-u","$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
}
C++配置
{
"cmd": ["g++", "-std=c++11","${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "run",
"cmd": ["cmd", "/c", "g++", "-std=c++11","${file}", "-o", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "${file_path}/${file_base_name} & pause"]
}
]
}
Java编译脚本
取名runjavasublime.bat放入jdk目录下
可任意更改名字相当于一键编译+运行的脚本
@echo off
cd%~dp1
echo Compiling %~nx1......
if exist %~n1.class (
del %~n1.class
)
javac %~nx1
if exist %~n1.class (
echo ------Output------
java %~n1
)
{
"shell_cmd": "runjavasublime.bat \"$file\"",//对应上面的脚本runjavasublime.bat
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java",
"encoding": "UTF-8"
}